Self-hosted routers such as vllm-router keep a session on one decode
replica by the X-Session-ID header, but the Chat Completions outbound path
forwards only accept-language and user-agent from the client. The new
account extra key `openai_chat_session_id` makes that path send the
client's session as X-Session-ID, isolated per API key with
isolateOpenAIUpstreamSessionID. The session comes from the same sources
as x-opencode-session: client session headers first, then the
prompt_cache_key or metadata.user_id remembered before protocol
conversion, so /v1/responses and /v1/messages requests converted to Chat
Completions keep their sessions. Account header overrides still apply
last, and accounts without the key send the same headers as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Google AI Studio rejects replayed function calls without a thought signature (400 "Function call is missing a thought_signature in functionCall parts"). The signature arrives in tool_calls[].extra_content.google, which Codex Responses history cannot preserve, so follow-up turns after tool calls fail when routed to AI Studio.
Before a Chat Completions request goes to generativelanguage.googleapis.com, give each assistant tool call without an existing thought_signature the dummy value skip_thought_signature_validator (matching the native Gemini path). Signatures embedded in Unity/LiteLLM "__thought__" call-id suffixes are not reused because they are issued by a different Google backend and fail with INVALID_THOUGHT_SIGNATURE; the call id itself is kept intact so tool outputs still match. Other upstreams are byte-for-byte unchanged.
Google AI Studio OpenAI-compatible streams send parallel tool calls
without an index, each whole in its own chunk with its own id. A missing
index defaulted to 0, so both calls merged into one item with arguments
like {"cmd":"ls"}{"cmd":"date"} and the stream failed with
invalid tool call arguments (502). Without an index, continue the last
call when the delta has no id or the same id, otherwise open the next
contiguous slot. Indexed streams are unchanged.
Content moderation collected Anthropic image blocks only from source.data, never
from source.url. Since #8312 the /v1/messages -> OpenAI Responses bridge forwards
URL image sources upstream as input_image, so an image sent as
{"type":"url","url":...} (including a data: URI) reached the model without
being moderated, while the same image sent as base64 was. The native Anthropic
path forwarded such images unmoderated as well.
Collect source.url like the other image URL fields; addModerationImage still
accepts only http(s) and data: values.
The previous Codex catalog advertised only "none" for k3.1-pro, so Codex
clients that still hold it send reasoning.effort=none. Preserving none for
K3.1 made those requests fail upstream with HTTP 400 (K3.1 cannot disable
thinking) instead of running at the default effort as they do today.
Keep the existing compatible-upstream rule on the Responses path: strip the
none placeholder for K3.1 exactly like every other Kimi model. The new
catalog no longer advertises none, so current clients are unaffected.
openCodeSessionHintBody built the hint with strconv.Quote, which emits Go
escapes such as \U000f0001 that are not JSON. A session id containing such a
rune (private-use or tag characters, e.g. subdivision flag emoji) was read
back truncated, so different conversations could share one
x-opencode-session. Encode with json.Marshal instead.
Also measure the compaction allocation budget in a child test process, as
main already does for other process-wide allocation counters, so background
goroutines left by other service tests cannot fail it intermittently.
The Anthropic /v1/responses bridge had the same gap as the Chat Completions
bridge: successful OAuth/setup-token responses never refreshed the 5h/7d
subscription windows. Sample the response headers on 2xx exactly like the
Chat Completions path, and cover both bridges in one regression test.
HelpTooltip always centered its popup above the trigger, so on a ~375px
screen any info icon near the left or right edge (ops dashboard cards,
accounts table headers, modal fields) pushed the tooltip off screen.
Several forms also hand-rolled CSS-only hover popups that are absolutely
positioned from the icon and get cut off by the viewport and the dialog
body.
- Move the placement logic from UsageTable into a shared
getTooltipPosition helper (utils/floatingPanel.ts): prefer one side,
flip to the opposite side when it does not fit, otherwise pin to the
viewport edge; clamp the cross axis.
- HelpTooltip measures its popup and uses the helper (above, flipping
below near the top of the screen); the arrow keeps pointing at the icon.
- UsageTable token/cost tooltips use the same helper.
- Replace the hand-rolled info popups in GroupsView, Create/EditAccountModal
and the usage stats cache breakdown with HelpTooltip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The token and cost detail tooltips in the usage table were always placed
8px to the right of the info icon. On narrow (mobile) screens the cost
column sits near the right edge, so the non-wrapping tooltip was cut off.
After rendering, measure the tooltip: flip it to the left of the icon when
it does not fit on the right, pin it to the right edge when neither side
fits, and clamp it vertically to the viewport.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up:
- Stop treating parameter errors as safety rejections. The message
matcher no longer uses a bare "moderation" keyword and rejects
"unknown/unrecognized/unsupported parameter" style messages, so
Azure-style "Unrecognized request argument supplied: moderation"
(param null) and error-passthrough rewrites (which drop param/code)
are not recorded with the user's prompt.
- Check explicit safety codes before the param exclusion, so Azure
content filtering (code=content_filter, param=prompt), contentFilter
and ResponsibleAIPolicyViolation are recorded; response_incomplete is
only a 400 for content_filter/moderation reasons and counts as well.
- Show image_safety rows with the hit badge instead of the amber error
badge, and exclude them from the "error" result filter.
Review follow-up for the proxy account count refresh:
- Apply a proxy list response only if it is newer than the last applied
one. Previously a failed newer refresh also discarded a slower older
success, which could leave the selector empty.
- Refresh proxy counts on every `created` event. Batch creation can
partially succeed and keep the dialog open, so opening the dialog was
not enough.
- Test ProxySelector with the real vue-i18n and locale files instead of
a hand-written mock of the plural rule.
The proxy selector in the account dialogs showed a bare number next to
the proxy name, and AccountsView loaded the counts only once on mount,
so they went stale after accounts were created, deleted, imported or
rebound.
- Show "N 个账号" / "N account(s)" on the right of each proxy row, before
the test button, with a tooltip.
- Reload proxies with counts whenever the create, edit or bulk-edit
dialog opens. A sequence guard drops out-of-order responses and a
failed reload keeps the previous list.
Image requests rejected by the upstream safety system (for example
"Your request was rejected by the safety system") were only visible in
the ops error log. They are now also written to the risk control center
as log-only evidence (action=image_safety, mode=risk_control_log_only):
no hash blacklist, no auto-ban count, no email, response unchanged.
Detection covers HTTP 400 from the native Images API, SSE/Responses
error events, model refusal text and content_filter incompletes. 400s
carrying error.param (e.g. an invalid `moderation` value) are excluded.
The record uses the gateway request ID from context so it joins with the
ops error log; the response header may carry the upstream x-request-id.
Refs #8992