Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(executors):** Vertex AI now routes Claude models through the native Anthropic `rawPredict` endpoint instead of the generic OpenAI-compatible partner endpoint, and synthesizes a real streaming response so Claude-via-Vertex works with `stream: true` ([#8909](https://github.com/diegosouzapw/OmniRoute/pull/8909)) — thanks @wgordon17
2 changes: 1 addition & 1 deletion config/quality/eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3319,4 +3319,4 @@
"count": 5
}
}
}
}
7 changes: 4 additions & 3 deletions open-sse/utils/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,6 @@ export function createSSEStream(options: StreamOptions = {}) {
passthroughSawFinishReason = true;
}


if (isFinishChunk && passthroughHasToolCalls) {
toolFinishTime = now;
try {
Expand Down Expand Up @@ -2220,7 +2219,8 @@ export function createSSEStream(options: StreamOptions = {}) {
},
pushProviderPayload: (payload: unknown) => providerPayloadCollector.push(payload),
pushClientPayload: (payload: unknown) => clientPayloadCollector.push(payload),
sanitizeUsagePayload: (payload: unknown) => sanitizeUsagePayloadForRequest(payload, body, clientResponseFormat),
sanitizeUsagePayload: (payload: unknown) =>
sanitizeUsagePayloadForRequest(payload, body, clientResponseFormat),
setPassthroughResponsesId: (value: string) => {
passthroughResponsesId = value;
},
Expand Down Expand Up @@ -2281,7 +2281,8 @@ export function createSSEStream(options: StreamOptions = {}) {
const bufferedPayload = parseSSELine(bufferedLine);
if (bufferedPayload) {
providerPayloadCollector.push(bufferedPayload);
if (sanitizeUsagePayloadForRequest(bufferedPayload, body, clientResponseFormat)) output = `data: ${JSON.stringify(bufferedPayload)}\n\n`;
if (sanitizeUsagePayloadForRequest(bufferedPayload, body, clientResponseFormat))
output = `data: ${JSON.stringify(bufferedPayload)}\n\n`;
if (
shouldInjectClaudeEmptyResponseBeforeCurrentEvent(
claudeEmptyResponseLifecycle,
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/executor-vertex-extended.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ test("VertexExecutor.buildUrl routes a non-JSON Express API key to the project-l
expressUrl,
"https://aiplatform.googleapis.com/v1/publishers/google/models/gemini-2.5-flash:generateContent?key=express-key-abc"
);
assert.ok(!expressUrl.includes("/projects/"), "Express key URL must not route through a project path");
assert.ok(
!expressUrl.includes("/projects/"),
"Express key URL must not route through a project path"
);
});

test("VertexExecutor.buildUrl routes partner and org-prefixed models to the global partner endpoint", () => {
Expand Down
Loading