Skip to content

fix: only send google_interactions_replay_available to Vertex engines - #497

Open
JoshuaDivineBlessing wants to merge 1 commit into
devfrom
fix/google-interactions-flag-vertex-only
Open

JoshuaDivineBlessing wants to merge 1 commit into
devfrom
fix/google-interactions-flag-vertex-only

Conversation

@JoshuaDivineBlessing

Copy link
Copy Markdown

Description

google_interactions_replay_available was 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):

  • Non-stream: masked 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.java
    • restoreInteractions: set google_interactions_replay_available and run the ThoughtSignatureSidecar replay only when engine.getModelType() == ModelTypeEnum.VERTEX.
    • preserveInteractions: return early when the flag is absent (non-Vertex) instead of throwing.
  • AnthropicEndpoints.java
    • Same Vertex-only guard when setting google_interactions_replay_available and computing interactionReplay.
  • No behavior change for Vertex engines.

How to Test

  1. Use a non-Vertex GPT engine (e.g. Azure/OpenAI GPT-6 Luna) and a bearer token of ACCESSKEY:SECRETKEY.
  2. Call POST /Monolith/api/model/openai/v1/chat/completions with {"model":"<engineId>","messages":[{"role":"user","content":"Reply with exactly: OK"}]}, both without and with "stream":true.
  3. Call POST /Monolith/api/model/anthropic/v1/messages with {"model":"<engineId>","max_tokens":100,"messages":[...]}, both without and with "stream":true.
  4. Expected: the reply text is returned in all four cases (previously a 500 or an empty stream).
  5. Regression: Claude engines still work on both endpoints. Vertex engines still get the flag and keep Google Interactions replay.

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

  • Introduced by the commit that added Google Interactions replay (Semoss 43ac842), which added the flag unconditionally.

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>
@JoshuaDivineBlessing
JoshuaDivineBlessing requested a review from a team as a code owner November 24, 2026 15:21
@snyk-io

snyk-io Bot commented Nov 24, 2026

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant