Repository navigation
Conversation
…h real streaming Claude models on Vertex AI were being sent through the generic OpenAI- compatible partner endpoint, which 404s/errors for Claude on at least some projects. Route them through Vertex's native Anthropic Messages API (publishers/anthropic/.../rawPredict) instead, stripping the body-level model field rawPredict rejects and injecting the required anthropic_version field. rawPredict only ever returns a complete JSON body, never real SSE framing, so streaming requests now get a genuine Anthropic-format SSE stream synthesized from that JSON (message_start/content_block_*/ message_delta/message_stop), which the existing claude-to-openai response translator already knows how to parse. Also fixes two response-format resolution bugs that silently dropped a custom model's DB-stored targetFormat override whenever the model id also existed in the static provider registry (as claude-sonnet-4-6 and claude-opus-4-7 do under vertex): resolveModelOrError had its own ad-hoc resolution that never consulted the override, and even once fixed, executeChatWithBreaker discarded the correctly-resolved format before handleChatCore's own resolution ran a second time.
check:file-size counts via content.split("\n").length (not wc -l), so
the single modelTargetFormat: targetFormat field this PR adds to the
existing executeChatWithBreaker() options object pushes chat.ts from
1845 to 1846 by that measure. Irreducible call-site wiring at the
existing dispatch chokepoint; bump the frozen baseline with
justification, matching this file's established rebaseline precedent.
Same two categories of inherited base-branch breakage as cheaper-inference#9006 (this PR shares the identical chatHelpers.ts diff), confirmed unrelated to this PR's own diff: - check:file-size: base.ts and chat.ts drifted further past their frozen caps via already-merged commits (7163081 and others) that didn't rebaseline after growing them. - chat-helpers.test.ts: two gpt-5.5 routing assertions predate cheaper-inference#9275 (fix(routing): bare model ids route to codex first), which deliberately made gpt-5.5 route to codex unconditionally. Updated both assertions and their names to match the new, intentional default.
2c01461 to
20828cc
Compare
…ex-claude-rawpredict-streaming # Conflicts: # config/quality/file-size-baseline.json
…ex-claude-rawpredict-streaming # Conflicts: # src/sse/handlers/chatHelpers.ts # tests/unit/executor-vertex-extended.test.ts
…ex-claude-rawpredict-streaming # Conflicts: # config/quality/file-size-baseline.json # tests/unit/combo-routing-engine.test.ts # tests/unit/t23-t24-fallback-resilience.test.ts
…ions Kept the assertion value fix (ALL_ACCOUNTS_INACTIVE -> ALL_TARGETS_SKIPPED); the comments were unnecessary. Reverts the file-size baseline bump these comments caused (combo-routing-engine.test.ts back to its original 3457).
…n every provider (#9006) * fix(executors): route Claude-via-Vertex through native rawPredict with real streaming Claude models on Vertex AI were being sent through the generic OpenAI- compatible partner endpoint, which 404s/errors for Claude on at least some projects. Route them through Vertex's native Anthropic Messages API (publishers/anthropic/.../rawPredict) instead, stripping the body-level model field rawPredict rejects and injecting the required anthropic_version field. rawPredict only ever returns a complete JSON body, never real SSE framing, so streaming requests now get a genuine Anthropic-format SSE stream synthesized from that JSON (message_start/content_block_*/ message_delta/message_stop), which the existing claude-to-openai response translator already knows how to parse. Also fixes two response-format resolution bugs that silently dropped a custom model's DB-stored targetFormat override whenever the model id also existed in the static provider registry (as claude-sonnet-4-6 and claude-opus-4-7 do under vertex): resolveModelOrError had its own ad-hoc resolution that never consulted the override, and even once fixed, executeChatWithBreaker discarded the correctly-resolved format before handleChatCore's own resolution ran a second time. * docs: add changelog fragment for #8909 * refactor(sse): extract shared Claude effort-model predicate * fix(sse): strip Claude effort-suffix ids for any provider serving a real Claude model * fix(sse): keep no-think and CC-discovery catalog variant roots unprefixed * fix(dashboard): re-qualify no-think playground model ids correctly * fix(sse): scope Vertex 404s to a per-model lockout via passthroughModels * docs: add changelog fragment for the Claude catalog/dispatch fix * fix(sse): align regex naming and changelog formatting * fix(sse): clarify effort-variant strip comment and add cross-module drift guard * fix(sse): disambiguate Vertex connection-wide vs per-model 403s * docs: document Vertex 403 disambiguation in changelog fragment * fix(sse): correlate reason and resource within the same ErrorInfo detail * fix(sse): extract Vertex error classifier and rebaseline frozen file sizes * test: register vertex-passthrough-model-lockout in stryker tap.testFiles * fix(sse): reconciles rebase-onto-tip drift for 9006 Two categories of inherited base-branch breakage surfaced when rebasing onto release/v3.8.50's latest tip, both confirmed unrelated to this PR's own diff: - check:file-size: base.ts and chat.ts drifted further past their frozen caps via already-merged commits (7163081 and others) that didn't rebaseline after growing them. Documented and bumped in file-size-baseline.json. - chat-helpers.test.ts: two gpt-5.5 routing assertions predate #9275 (fix(routing): bare model ids route to codex first), which deliberately made gpt-5.5 route to codex unconditionally, regardless of which other providers are active. Confirmed via #9275's own commit message and code comments this is intentional, not a regression; verified reproducible on the raw base tip alone, with no changes from this PR involved. Updated both assertions and their names to match the new, intentional default. * ci: re-trigger checks after GitHub Actions incident (2026-08-07, resolved) * ci: re-trigger checks (previous push event was dropped) * fix(quality): rebaseline combo-routing-engine.test.ts own-comment growth The ALL_ACCOUNTS_INACTIVE->ALL_TARGETS_SKIPPED fix (a32aed738) added explanatory comments (+7 lines), pushing the file past its frozen 3457 cap. CI's PR-mode check:file-size caught it; local check-file-size.mjs was not re-run after that specific commit.
…ex-claude-rawpredict-streaming # Conflicts: # config/quality/file-size-baseline.json
- open-sse/utils/stream.ts: drop duplicate sseCommentsEnabled import (both merge parents added it independently, no textual conflict) — fixes open-sse-typecheck TS2300 regression - skills/omni-settings/SKILL.md: regenerate via check:agent-skills-sync --apply to match its catalog entry (merge integrity gate) - config/quality/eslint-suppressions.json: prune 5 stale entries no longer occurring (npx eslint --prune-suppressions)
…-claude-rawpredict-streaming # Conflicts: # config/quality/file-size-baseline.json
|
The PR remains in the release drain with |
1 similar comment
|
The PR remains in the release drain with |
|
Live validation complete (Hard Rule #18 — the network-dependent rawPredict/streaming behavior TDD can't fully prove). Redacted below: GCP project id → Environment: isolated OmniRoute instance built from this branch (fresh throwaway 1. Raw upstream proof —
|
|
Hi @wgordon17 — thanks for the detailed diagnosis here. Looking at the current release branch, the rawPredict routing + real-streaming-synthesis fix you describe is already live in We're evaluating this as a likely-subsumed PR — really appreciate you tracking down the root cause, and we want to make sure you get credit for the diagnosis before deciding how to close this out. Will follow up here once that's settled. |
|
Thanks for the diagnosis and fix — verified the substance already landed on the release tip: Auditing this PR's actual current diff against the release tip: it's now down to Closing as subsumed — thanks again for finding and root-causing the original bug. |
…n every provider (cheaper-inference#9006) * fix(executors): route Claude-via-Vertex through native rawPredict with real streaming Claude models on Vertex AI were being sent through the generic OpenAI- compatible partner endpoint, which 404s/errors for Claude on at least some projects. Route them through Vertex's native Anthropic Messages API (publishers/anthropic/.../rawPredict) instead, stripping the body-level model field rawPredict rejects and injecting the required anthropic_version field. rawPredict only ever returns a complete JSON body, never real SSE framing, so streaming requests now get a genuine Anthropic-format SSE stream synthesized from that JSON (message_start/content_block_*/ message_delta/message_stop), which the existing claude-to-openai response translator already knows how to parse. Also fixes two response-format resolution bugs that silently dropped a custom model's DB-stored targetFormat override whenever the model id also existed in the static provider registry (as claude-sonnet-4-6 and claude-opus-4-7 do under vertex): resolveModelOrError had its own ad-hoc resolution that never consulted the override, and even once fixed, executeChatWithBreaker discarded the correctly-resolved format before handleChatCore's own resolution ran a second time. * docs: add changelog fragment for cheaper-inference#8909 * refactor(sse): extract shared Claude effort-model predicate * fix(sse): strip Claude effort-suffix ids for any provider serving a real Claude model * fix(sse): keep no-think and CC-discovery catalog variant roots unprefixed * fix(dashboard): re-qualify no-think playground model ids correctly * fix(sse): scope Vertex 404s to a per-model lockout via passthroughModels * docs: add changelog fragment for the Claude catalog/dispatch fix * fix(sse): align regex naming and changelog formatting * fix(sse): clarify effort-variant strip comment and add cross-module drift guard * fix(sse): disambiguate Vertex connection-wide vs per-model 403s * docs: document Vertex 403 disambiguation in changelog fragment * fix(sse): correlate reason and resource within the same ErrorInfo detail * fix(sse): extract Vertex error classifier and rebaseline frozen file sizes * test: register vertex-passthrough-model-lockout in stryker tap.testFiles * fix(sse): reconciles rebase-onto-tip drift for 9006 Two categories of inherited base-branch breakage surfaced when rebasing onto release/v3.8.50's latest tip, both confirmed unrelated to this PR's own diff: - check:file-size: base.ts and chat.ts drifted further past their frozen caps via already-merged commits (174e08b and others) that didn't rebaseline after growing them. Documented and bumped in file-size-baseline.json. - chat-helpers.test.ts: two gpt-5.5 routing assertions predate cheaper-inference#9275 (fix(routing): bare model ids route to codex first), which deliberately made gpt-5.5 route to codex unconditionally, regardless of which other providers are active. Confirmed via cheaper-inference#9275's own commit message and code comments this is intentional, not a regression; verified reproducible on the raw base tip alone, with no changes from this PR involved. Updated both assertions and their names to match the new, intentional default. * ci: re-trigger checks after GitHub Actions incident (2026-08-07, resolved) * ci: re-trigger checks (previous push event was dropped) * fix(quality): rebaseline combo-routing-engine.test.ts own-comment growth The ALL_ACCOUNTS_INACTIVE->ALL_TARGETS_SKIPPED fix (a32aed738) added explanatory comments (+7 lines), pushing the file past its frozen 3457 cap. CI's PR-mode check:file-size caught it; local check-file-size.mjs was not re-run after that specific commit.
Summary
rawPredictendpoint instead of the generic OpenAI-compatible partner endpoint (which 404s/errors for Claude on at least some projects), stripping the body-levelmodelfieldrawPredictrejects and injecting the requiredanthropic_version.rawPredictonly ever returns a complete JSON body (never real SSE framing), streaming requests now get a genuine Anthropic-format SSE stream synthesized from that JSON so the existing claude-to-openai response translator can parse it correctly.targetFormatoverride whenever the model id also existed in the static provider registry (asclaude-sonnet-4-6/claude-opus-4-7do under vertex).@omniroute/opencode-plugin/src/index.ts, theno-new-funcfinding intests/unit/cli-env-inline-comment-10100.test.ts, the 5window.location.hrefwarnings, and 4 fast-path unit test failures (combo-quota-exhaustion-only-fallback,free-tier-providers-wave1-a,combo-499-abort,combo-stream-readiness-fallback) are confirmed identical torelease/v3.8.50tip (zero diff) and independently red on the release branch's own CI — not introduced by this PR.