You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 197c82a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(openai-chat): gate the chat service tier behind a provider opt-in
Follow-up on top of @Yuxin-Qiao's forwarding commit.
The forwarding itself is right: the Responses parser records a
caller-supplied service_tier and this adapter dropped it, so the value
never reached the wire. But 66 registry providers share the openai-chat
adapter, and applyServiceTierGate only strips for openai-responses, so
forwarding unconditionally would put an OpenAI-specific field on every
one of them. Strict gateways reject unknown body fields, which turns a
caller-supplied tier into an upstream 400 on routes that work today.
prompt_cache_key directly below already solves this exact problem with an
opt-in flag, and its comment names the same hazard. service_tier now
follows that precedent: chatServiceTier on the registry entry, threaded
through derive and router the way promptCacheKey is.
supportsServiceTier is deliberately not reused — it governs the Responses
wire through applyServiceTierGate and means something different.
No registry entry opts in yet; that wants per-provider evidence that the
gateway documents the parameter, which is a separate change.
0 commit comments