Repository navigation
fix: only send google_interactions_replay_available to Vertex engines - #497
Open
JoshuaDivineBlessing wants to merge 1 commit into
Open
JoshuaDivineBlessing wants to merge 1 commit into
JoshuaDivineBlessing wants to merge 1 commit into
Conversation
The flag was added to the request for every model on the OpenAI and Anthropic compatible endpoints. Non-Vertex engines (e.g. GPT) forward it to the provider, which rejects it and returns a masked 500 (empty stream when stream=true). Set it and run the Google Interactions sidecar only for Vertex engines, and skip preserveInteractions when the flag is absent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
google_interactions_replay_availablewas added to the request parameters for every model on the OpenAI-compatible (/api/model/openai/v1) and Anthropic-compatible (/api/model/anthropic/v1) endpoints. Only Vertex (Google Interactions) engines use it. Non-Vertex engines such as GPT forward the unknown parameter to the provider, which rejects it. Claude ignores it, so it went unnoticed.Symptoms for GPT models (e.g. GPT-6 Luna, GPT 5.4):
500("The model provider failed").stream: true: HTTP 200 with an empty stop chunk (error swallowed), so clients like Codex fail with no clear message.Changes Made
OpenAIEndpoints.javarestoreInteractions: setgoogle_interactions_replay_availableand run theThoughtSignatureSidecarreplay only whenengine.getModelType() == ModelTypeEnum.VERTEX.preserveInteractions: return early when the flag is absent (non-Vertex) instead of throwing.AnthropicEndpoints.javagoogle_interactions_replay_availableand computinginteractionReplay.How to Test
ACCESSKEY:SECRETKEY.POST /Monolith/api/model/openai/v1/chat/completionswith{"model":"<engineId>","messages":[{"role":"user","content":"Reply with exactly: OK"}]}, both without and with"stream":true.POST /Monolith/api/model/anthropic/v1/messageswith{"model":"<engineId>","max_tokens":100,"messages":[...]}, both without and with"stream":true.Verified locally with GPT-6 Luna on the OpenAI endpoint (stream and non-stream), the Anthropic endpoint (stream and non-stream), and the Codex CLI via
/responses.Notes
43ac842), which added the flag unconditionally.