gateway: expose GreenPT's Metis decision model at /v1/systemone

Metis is a decision endpoint (state + typed questions -> probabilities),
not a chat completion: it emits no text, so it cannot be a model_list entry.
Expose it as a pass-through endpoint under general_settings, behind the
member's normal co-op key (auth: true), with GreenPT's key injected from the
app env (Bearer os.environ/GREENPT_API_KEY). cost_per_request is an
APPROXIMATION for budget accounting (~800 input tokens at $0.12/1M);
exact billing would need a patch_*.py in the house style.
This commit is contained in:
inference-bot committed 2026-11-03 18:24:49 +00:00
1 parent e8378d941a
commit e4e70962ec
1 file changed
+29
+29
View File
@@ -233,6 +233,35 @@ general_settings:
database_url: os.environ/DATABASE_URL database_url: os.environ/DATABASE_URL
store_model_in_db: true store_model_in_db: true
# --- Metis (GreenPT) — decision model, not a chat model ---
# Metis is a *decision* endpoint, not a chat completion: it takes a `state`
# plus up to 32 typed questions and returns PROBABILITIES / choices / scores.
# It generates no text (output_tokens is always 0), so it cannot be a
# model_list entry — LiteLLM's chat pipeline has nothing to parse. It is
# exposed as a pass-through route instead, and members call it with their
# normal co-op API key (auth: true), never the provider key.
#
# GreenPT-hosted (policy-based privacy, EU, 100% renewable), same
# GREENPT_API_KEY the green chat models already use.
# Price: $0.12 per 1M *input* tokens; output is free.
#
# METERING IS APPROXIMATE. LiteLLM cannot price a pass-through route from the
# response body, so cost_per_request (USD per request) is a flat estimate used
# for budget accounting — 0.0001 ≈ a typical ~800-input-token call. Exact
# per-token billing (reading usage.input_tokens from the Metis response) would
# need a patch in the house style of the existing patch_*.py files; until then
# treat the spend figure for this route as an approximation, not an invoice.
pass_through_endpoints:
- path: "/v1/systemone"
target: "https://api.greenpt.ai/v1/systemone"
headers:
Authorization: "Bearer os.environ/GREENPT_API_KEY"
Content-Type: "application/json"
auth: true
methods: ["POST"]
timeout: 60
cost_per_request: 0.0001
litellm_settings: litellm_settings:
salt_key: os.environ/LITELLM_SALT_KEY salt_key: os.environ/LITELLM_SALT_KEY
drop_params: true drop_params: true