Commit graph

55116 commits

Author SHA1 Message Date
Emerson Gomes
08effa0ae1
Merge a4bcd7cf6b into f2118fc767 2026-10-21 21:37:46 -05:00
Emerson Gomes
a4bcd7cf6b
fix(realtime): enforce translation policies and normalize Azure transcription URLs 2026-10-21 21:30:19 -05:00
Emerson Gomes
787b620059
fix(realtime): preserve prior merge resolutions after rebase 2026-10-21 21:30:19 -05:00
mateo-berri
c48cbde7b7
fix(azure): pick the GA realtime protocol for deployments whose model_info.base_model is GA-only 2026-10-21 21:30:19 -05:00
mateo-berri
ae6199d730
fix(realtime): address review findings on transcription billing, streaming and realtime auth
Per-second pricing replaces token billing only when the priced entry sets no token rates, translation rates fall back per key to the cost map, transcription cache keys include languages and keywords, a stream request a post_call guardrail forces unstreamed comes back as redacted SSE, Azure beta clients are bridged only for GA-only deployments, nested transcription models on the realtime WebSocket are checked against the key, and translation spend carries key and team metadata
2026-10-21 21:30:19 -05:00
mateo-berri
34319dff7d
fix(realtime): keep main's transcription, client secret and route behavior where the PR changed it
Transcription reaches every provider as on main again, sends stream only when asked, forwards language and
languages together, keeps form key order, bills provider seconds only when above zero, honors base_model for the
new flags, keeps main's Azure api_version on the proxy path, and streams carry chat's headers, an error event on a
mid-stream failure, and a spend row when the stream ends early. Translation cost reads both per-second rates from
one source and spend rows carry the billed seconds.

Realtime transcription WebSockets keep model in the upstream URL outside OpenAI's hosts, client secrets forward
explicit nulls, accept conversation and delay, and answer 400 on a malformed body, the /openai translation paths
are back to main, translation refuses only for guardrails realtime sessions run, nested aliases resolve and later
session.update models are authorized, translation client secrets run per-model auth, beta clients bridged to GA
get beta-shaped session events, and transcription sessions send the deployment model in both shapes.
2026-10-21 21:30:18 -05:00
mateo-berri
c57d273aa6
fix(realtime): restore main behavior for guardrails, Azure transcription, and realtime clients
Streamed transcription runs unstreamed when a deployment post_call guardrail applies, so the
guardrail still sees the transcript. Azure transcription maps v1, latest and preview to the
default dated version on the deployments route for every model. The SDK client secret keeps
session.model ahead of model, realtime WebSockets connect to api_base again, realtime metadata
keeps only guardrails, and managed agents need an explicit transcription model. Reverts the two
unrelated streamed Responses error codes and the duplicate cached_tokens_details field, and the
gpt-transcribe format check only reads the request provider's cost map entry.
2026-10-21 21:30:18 -05:00
mateo-berri
64fcaee7ab
fix(realtime): keep main's routing, protocol and transport behavior around the new translation routes
- Send OpenAI realtime and translation client_secrets and calls through litellm's httpx client again, so ssl_verify and custom CA settings apply and upstream errors keep main's shape
- Use the input transcription model as the session model only for transcription sessions
- Drop the new /openai/v1 translation aliases and record each lazy feature's own routes, so the /openai pass-through and the MCP routes resolve as on main
- Let a configured Azure realtime_protocol win for every model, with GA as the default only when none is set
- Return x-litellm headers on streamed transcriptions and mark the request done
- Refuse translation sessions before connecting upstream when realtime guardrails apply or the provider is not OpenAI or Azure
- Accept json and text for gpt-transcribe, and drop other formats under drop_params instead of failing
- Bill translation sessions on output audio seconds only, at the single published rate
- Document the 201 SDP answer on the translation calls routes and the transcription 200 response
2026-10-21 21:30:18 -05:00
mateo-berri
e82a765066
fix(transcription): log streamed transcription usage from the provider response
The stream logging path built the spend payload from the response after
its duration usage was transformed away, so whisper-1 with stream=true and
streamed gpt-transcribe logged an empty usage object. Bill and log from the
provider's TranscriptionResponse in both the sync and async paths.
2026-10-21 21:30:18 -05:00
mateo-berri
b321d67030
fix(audio): bill streamed gpt-transcribe from the provider's reported duration
The stream path computed cost after logging had replaced the transcription's
duration usage, so it fell back to the measured file length while the
unstreamed call billed the provider's seconds.
2026-10-21 21:30:18 -05:00
mateo-berri
572bf65013
fix(audio): pass stream, languages and keywords through unchecked for non-OpenAI transcription providers
Providers without a streaming transcription handler got UnsupportedParamsError
for stream=True, languages and keywords, where the merge base forwarded them as
provider-specific params. Only openai and azure validate them now.
2026-10-21 21:30:18 -05:00
mateo-berri
2501523ecd
fix(audio): log streamed transcripts whose done event reports detected languages 2026-10-21 21:30:18 -05:00
Emerson Gomes
8855c1385e
fix(realtime): enforce model budgets and preserve translation routing 2026-10-21 21:30:18 -05:00
Emerson Gomes
19bcd5c584
refactor(audio): reuse transcription mapping and duration resolution 2026-10-21 21:30:18 -05:00
Emerson Gomes
04b704192c
fix(typing): avoid Final declarations inside transcription cost loop 2026-10-21 21:30:18 -05:00
Emerson Gomes
8212c9498b
fix(audio): scope provider duration precedence to configured models 2026-10-21 21:30:18 -05:00
Emerson Gomes
4ffff0a578
fix(realtime): preserve upstream authentication and transcription behavior 2026-10-21 21:30:18 -05:00
Emerson Gomes
cb710d6b4e
fix(realtime): preserve deferred Live session authorization 2026-10-21 21:30:18 -05:00
Emerson Gomes
98009dcce0
fix(realtime): preserve minimum OpenAI SDK compatibility 2026-10-21 21:30:18 -05:00
Emerson Gomes
d8262a441b
fix(audio): validate provider responses at SDK boundaries 2026-10-21 21:30:18 -05:00
Emerson Gomes
a5d620606f
fix(realtime): reconcile audio protocols with current upstream 2026-10-21 21:30:18 -05:00
Emerson Gomes
318f0a61de
chore(ci): rerun transient infrastructure timing failure 2026-10-21 21:30:18 -05:00
Emerson Gomes
e6f9403434
fix(realtime): reject translation policy pipelines 2026-10-21 21:30:17 -05:00
Emerson Gomes
220fe868fc
fix(realtime): preserve absent models and reject unsupported guardrails 2026-10-21 21:30:17 -05:00
Emerson Gomes
5e28d359b9
fix(realtime): trust confirmed formats and authorize default models 2026-10-21 21:30:17 -05:00
Emerson Gomes
515f6da598
fix(realtime): reconcile audio protocols billing and current CI 2026-10-21 21:30:17 -05:00
Emerson Gomes
913c5dd250
fix(transcription): reject streams that bypass output guardrails 2026-10-21 21:30:17 -05:00
Emerson Gomes
0e69d04d36
fix(realtime): retain missing translation input usage at close 2026-10-21 21:30:17 -05:00
Emerson Gomes
b06e6d2695
test(transcription): verify synchronous stream finalization 2026-10-21 21:30:17 -05:00
Emerson Gomes
eaaccfcc5a
fix(realtime): preserve translation deployment pricing and input usage 2026-10-21 21:30:17 -05:00
Emerson Gomes
099d9b3cc8
refactor(realtime): align annotations with current lint rules 2026-10-21 21:30:17 -05:00
Emerson Gomes
7d1d051750
fix(transcription): reject nonfinite provider durations 2026-10-21 21:30:17 -05:00
Emerson Gomes
6ee09681c1
fix(realtime): preserve batch cache rates and Azure v1 routes 2026-10-21 21:30:17 -05:00
Emerson Gomes
2dab37ae53
fix(realtime): reject malformed provider durations 2026-10-21 21:30:17 -05:00
Emerson Gomes
7d79d642f8
fix(realtime): bill retained output and route Azure aliases 2026-10-21 21:30:17 -05:00
Emerson Gomes
27115706ce
fix(realtime): preserve input usage and provider routing 2026-10-21 21:30:17 -05:00
Emerson Gomes
366d7f7fd9
fix(realtime): address transcription and billing review findings 2026-10-21 21:30:17 -05:00
Emerson Gomes
3fb2252376
fix(realtime): keep transcription validation compatible with cost map guard 2026-10-21 21:30:17 -05:00
Emerson Gomes
e0ae1d2925
fix(realtime): preserve provider duration and model capabilities 2026-10-21 21:30:17 -05:00
Emerson Gomes
3e71406b29
fix(realtime): reconcile model metadata and test contracts 2026-10-21 21:30:17 -05:00
Emerson Gomes
d6518778c1
refactor(audio): keep transcription pricing selection together 2026-10-21 21:30:16 -05:00
Emerson Gomes
8fa5c0e914
fix(audio): bill finalized streams and authorize transcription models 2026-10-21 21:30:16 -05:00
Emerson Gomes
98f0d3c7c6
refactor(realtime): reuse SDK client initialization 2026-10-21 21:30:16 -05:00
Emerson Gomes
771fd03595
fix(realtime): preserve transport settings and translation duration 2026-10-21 21:30:16 -05:00
Emerson Gomes
d9f21872e2
fix(transcription): type SDK stream duration metadata explicitly 2026-10-21 21:30:16 -05:00
Emerson Gomes
bd603fa44e
feat(realtime): support latest OpenAI audio models 2026-10-21 21:30:16 -05:00
ryan-crabbe-berri
f2118fc767
fix(security): stop trusting the compromised eMudhra root CA (#47670)
Some checks failed
unit / enterprise-routing (push) Has been cancelled
unit / guardrails-hooks (push) Has been cancelled
unit / jwt-and-keys (push) Has been cancelled
unit / key-generation (push) Has been cancelled
unit / logging-misc (push) Has been cancelled
unit / mcp-oauth (push) Has been cancelled
unit / proxy-runtime (push) Has been cancelled
unit / proxy-server-core (push) Has been cancelled
unit / root (push) Has been cancelled
unit / proxy-utils (push) Has been cancelled
unit / enterprise-package (push) Has been cancelled
unit / integrations (push) Has been cancelled
unit / llms-anthropic (push) Has been cancelled
unit / llms-bedrock (push) Has been cancelled
unit / llms-openai-meta (push) Has been cancelled
unit / llms-providers (push) Has been cancelled
unit / llms-vertex-ai (push) Has been cancelled
unit / enterprise-managed-files (push) Has been cancelled
unit / redis-py 5.3.1 compatibility (push) Has been cancelled
unit / redis-py 6.4.0 compatibility (push) Has been cancelled
unit / redis-py 7.4.1 compatibility (push) Has been cancelled
unit / redis-py 8.0.1 compatibility (push) Has been cancelled
unit / coverage (push) Has been cancelled
unit / unit passed (push) Has been cancelled
unit / enterprise-repositories-secrets (push) Has been cancelled
unit / proxy-server (push) Has been cancelled
unit / lens-python-310 (push) Has been cancelled
unit / caching-local (push) Has been cancelled
unit / core-utils (push) Has been cancelled
unit / endpoints (push) Has been cancelled
Update certifi, Rust trust roots, and the Docker CA bundle to remove emSign ECC Root CA - G3

Require the fixed certifi release in litellm-core and retain libssl3 in Docker runtimes for Prisma compatibility

Co-authored-by: shin-berri <shin-laptop@berri.ai>
2026-10-22 02:09:52 +00:00
yujonglee
b6f91a221b
refactor(inference): rename RouteError to Error (#47771)
Every other crate names its error Error. The format crates already re-exported
it under that name, so only the inference crate and a few importers change
2026-10-21 07:03:18 -07:00
Krrish Dholakia
3f93350411
docs: rename security.md to SECURITY.md and point contact to security@berri.ai (#47581)
Co-authored-by: krrish-berri-2 <270687000+krrish-berri-2@users.noreply.github.com>
2026-10-21 06:37:24 -07:00
Mateo Wang
9d8fe1ddb5
refactor(types): replace Any with proven types in 50 files (#47818)
* refactor(types): replace Any with proven types in 100 files

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(types): keep untyped parsing where strict validation changed accepted shapes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(types): keep the OpenAI-compatible response parse untyped

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(types): keep only annotation changes, drop new runtime validation

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-21 11:58:31 +00:00