Commit Graph
30 Commits
Author SHA1 Message Date
inference-bot 54925cae97 gateway: add greenpt/qwen3-embedding-8b (member-facing embeddings)
A member with API-spend history for tinfoil/nomic-embed-text reported the
model 'missing'. It was never removed: it has been admin-team scoped
(model_info.team_id) since it was added 2026-10-07 for the co-op's own
docs-RAG, and team-scoped models are hidden from every /v1/models listing
by design — the member's dashboard row was their own refused call. Tinfoil
still serves nomic-embed-text upstream; nothing to restore.

What WAS missing is a member-callable embedding model. GreenPT serves
qwen3-embedding-8b (id verbatim, type EMBEDDINGS): $0.25/1M input from
GreenPT's own /v1/pricing, no output charge, 32K context. Added as a
regular model_list entry (no team_id) so any member key can call it via
/v1/embeddings; the portal filters mode:embedding out of the chat picker.
max_input_tokens declared from the provider's contextWindowTokens.

Additive change only: every pre-existing model_info byte-identical,
fallbacks and pass-through untouched; boot-proved on a spare port in the
container before deploy.
2026-11-06 20:28:05 +00:00
inference-bot da02f8eb32 gateway: price the Metis pass-through route from its reported tokens
The /v1/systemone pass-through is an EndpointType.GENERIC route: LiteLLM
logs it, but with no model on the route the only cost it can apply is the
flat cost_per_request (a budget estimate, not an invoice). So decisions
were billed at a fixed 0.0001 instead of the real $0.12 per 1M input
tokens GreenPT reports back in usage.input_tokens.

Price the route from its own response body via a new build-time patch,
patch_passthrough_token_cost.py, in the house style of the existing
patch_*.py files: any route listed in
general_settings.coop_passthrough_cost_per_token (USD per input token,
keyed by path) is billed as usage.input_tokens x rate. cost_per_request
stays as the fallback for a listed route whose response carries no token
count, and every unlisted route is unchanged. Auth is untouched.

config.yaml: list /v1/systemone at 0.00000012 ($0.12 per 1M input
tokens); update the metering note.
2026-11-03 18:58:07 +00:00
inference-bot 557999a16f gateway: let member keys reach the Metis pass-through route
LiteLLM gates auth=true pass-through routes behind allowed_passthrough_routes,
a LiteLLM Enterprise field: on this community-edition proxy the management API
refuses to set it, so no member key can ever be granted access, and auth:false
would instead expose the route (and our GreenPT key) to anonymous callers.

Add patch_passthrough_key_access.py (house style: build-time, non-fatal,
idempotent, compile-checked) so routes the operator names in
general_settings.coop_passthrough_open_to_keys are callable by ANY
authenticated key. Authentication itself is unchanged: auth=true still installs
Depends(user_api_key_auth), so unauthenticated requests are still rejected.

Validated locally against LiteLLM 1.103.2: a plain generated key gets 200 with
real Metis answers; an unauthenticated POST gets 401.
2026-11-03 18:30:22 +00:00
inference-bot e4e70962ec 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.
2026-11-03 18:24:49 +00:00
inference-bot e8378d941a gateway: Regolo's 2026-11-01 prices
apertus-70b input 0.40->1.00 EUR (+152%), output 2.10->3.40; qwen3.5-122b input 1.00->0.60 (-40%), output 4.20->3.40. EUR->USD at the existing 1.16 peg. Also converts regolo/qwen-image's per-pixel cost out of the EUR-as-USD state it was in (1.5e-8 -> 1.74e-8).
2026-11-01 00:41:42 +00:00
Ubuntu a6098741d0 gateway: declare a zero character price for voxtral-tts so speech can bill
Speech still billed nothing after the router patch put its pricing on the shared
cost map. Cause, read out of cost_per_token: for a speech model
select_cost_metric_for_model picks "cost_per_character", and that branch raises
ValueError("cost for tts call is None") when no character price is declared. The
raise aborts the whole cost calculation, so the spend write is skipped and the
per-request patch never runs — the entry being unpriced per character made the
per-request charge unreachable.

Declaring input_cost_per_character: 0 lets the path complete with a zero
per-unit cost, after which the patch adds the real $0.002 per request.

Measured, not assumed: transcription bills $0.010000 exactly (whisper's token
price is $0, so that is entirely the per-request charge), while speech sat at
$0.000000 across three deploys.
2026-10-26 21:29:59 +00:00
Ubuntu 425d738625 gateway: bill Tinfoil's per-request charges on the audio paths
Tinfoil bills voxtral-tts $0.002 and whisper-large-v3-turbo $0.01 per REQUEST,
with $0 per token for both. Reading only the two token prices in its model list
made TTS look free and left STT billed at an older catalog's $0.05/1M tokens, so
neither matched what the co-op actually pays.

LiteLLM cannot express a per-request charge on the audio paths: per-request
pricing exists only on the search/rerank/MCP paths via input_cost_per_query, and
input_cost_per_request is read only by the proxy's cost-tracking settings, never
by the model cost calculator.

So patch_audio_request_cost.py, a build-time patch in the same shape as
patch_image_cost.py, makes response_cost_calculator honour a declared
input_cost_per_request. That function is the single funnel for every call type —
the proxy dispatches audio as `aspeech` and `transcription` and reaches it
through Logging._response_cost_calculator — so one insertion covers both. The
charge resolves from the per-deployment custom_pricing the logging layer builds
from our model_info, then the shared cost map, then call metadata, and the patch
is inert for any model that declares nothing.

config.yaml declares the real charges: $0.002/request for voxtral-tts, and
$0.01/request for whisper with its token price corrected to $0.

Verified before committing: the patch applies to the installed 1.103.2 anchors
and compiles; the helper's resolution order passes unit checks (all branches,
plus inert and garbage cases); the resulting config validates as YAML with all
12 entries intact. End-to-end spend is proven after deploy by a real TTS/STT call.

Refs code/litellm#5
2026-10-26 20:45:06 +00:00
Inferencebot 9d95527e93 Remove PublicAI provider (billing never operational; Regolo replaces it for Apertus) 2026-10-16 10:46:04 -06:00
Inferencebot ad34da72a4 Add Regolo provider: apertus-70b, qwen3.5-122b (thinking off), qwen-image + Apertus fallback chain 2026-10-16 10:10:45 -06:00
Inferencebot 3397d07ec1 Replace tinfoil/glm-5-3-flash (deprecated 2026-10-09) with tinfoil/glm-5.3 flagship 2026-10-07 22:07:40 -06:00
Inferencebot cc8f7d237a Add tinfoil/nomic-embed-text embedding model (admin-team scoped, for co-op docs RAG) 2026-10-07 09:44:12 -06:00
Inferencebot 1f2c330762 greenpt/glm-5.3: add cache-read price (0.275/1M per GreenPT pricing API) — member PR follow-up 2026-10-05 08:40:13 -06:00
Inferencebot a0ae99329f Add greenpt/deepseek-v4.1-flash as default (renewable, not Experimental); fallback → tinfoil deepseek 2026-10-02 22:15:44 -06:00
Inferencebot 516167aaf9 Remove green-l/green-r models (GreenPT marks them not recommended) 2026-10-02 22:04:47 -06:00
Inferencebot b6e8542146 config: remove duplicate broken audio-model entries (audio_transcription//audio_speech/ prefixes); keep the correct openai/ routing 2026-10-02 15:39:07 -06:00
inference-bot 8f42be988e Add Tinfoil audio models (whisper STT, voxtral-tts) for voice mode + API use 2026-09-27 11:10:51 -06:00
inference-bot 5ea2256776 Add greenpt/glm-5.3 (full flagship, $1.10/$4.40 per 1M) 2026-09-26 16:52:21 -06:00
inference-bot 057507d67c Add PublicAI Apertus models (publicai/apertus-v1.5-8b, -70b) 2026-09-25 15:56:08 -06:00
inference-bot 2369c3e848 Add greenpt/glm-5.3-flash (/usr/bin/bash.11//usr/bin/bash.44 per 1M) 2026-09-24 10:43:14 -06:00
inference-bot f86e005062 Rename Tinfoil models to tinfoil/* provider prefix 2026-09-24 08:16:16 -06:00
inference-bot 67192de232 Document pricing sync with co-op/docs/models.md 2026-09-23 21:08:33 -06:00
inference-bot 09ee36014c Add GreenPT models (greenpt/green-r, greenpt/green-l) via provider/model naming convention 2026-09-23 20:10:18 -06:00
inference-bot d1f57c45d5 Retry connection errors but never re-bill timeouts
num_retries=2 (retries transient connection errors), retry_policy with
TimeoutErrorRetries=0 (a timed-out generation is already billed by Tinfoil, so
re-hitting it re-bills). Combined with timeout=180, this hedges connection
errors without the silent re-billing that caused the Tinfoil spend gap.
2026-09-22 18:18:07 -06:00
inference-bot 576885ed21 Fix Tinfoil spend gap: raise timeout 30->180s, num_retries 2->0
DeepSeek V4.1 Flash is a reasoning model; 30s timeout caused LiteLLM to
abandon in-flight generations (falling back to GPT-OSS) while Tinfoil still
completed and billed them. num_retries re-hit Tinfoil up to 3x. Result: Tinfoil
billed ~2x the tokens LiteLLM logged. Generous timeout + zero retries stops
the silent re-billing.
2026-09-22 18:05:27 -06:00
inference-bot 700154c3d4 Add custom per-token pricing (model_info) so spend and budget enforcement work 2026-09-14 14:28:13 -06:00
inference-bot da50b0438f Replace deprecated deepseek-v4-flash with deepseek-v4-1-flash (default + fallback) 2026-09-14 14:06:23 -06:00
inference-bot 878ab8fa8d Add GLM-5.3 Flash model 2026-09-09 14:18:14 -06:00
inference-bot e05fec0ca8 Switch to Tinfoil (TEE): add tinfoil-proxy sidecar for EHBP encryption, point LiteLLM at local proxy 2026-09-09 13:21:01 -06:00
inference-bot 2ce5c66b9b Switch to Ollama Cloud (OpenAI-compatible /v1 endpoint) for plumbing smoke test 2026-09-04 14:15:49 -06:00
inference-bot b9b4620e52 Initial commit: LiteLLM Cloudron app package for Inference Cooperative 2026-09-03 21:55:54 -06:00