Skip to content
Merged
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
1 change: 1 addition & 0 deletions packages/proxy/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ export const AvailableEndpointTypes: { [name: string]: ModelEndpointType[] } = {
"publishers/mistralai/models/mistral-large-2411": ["vertex"],
"publishers/mistralai/models/mistral-nemo": ["vertex"],
"publishers/mistralai/models/codestral-2501": ["vertex"],
"publishers/qwen/models/qwen3-235b-a22b-instruct-2507-maas": ["vertex"],
"publishers/anthropic/models/claude-sonnet-4-5": ["vertex"],
"publishers/anthropic/models/claude-sonnet-4-5@20250929": ["vertex"],
"publishers/anthropic/models/claude-sonnet-4": ["vertex"],
Expand Down
10 changes: 10 additions & 0 deletions packages/proxy/schema/model_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -4943,6 +4943,16 @@
"max_input_tokens": 262144,
"max_output_tokens": 16384
},
"publishers/qwen/models/qwen3-235b-a22b-instruct-2507-maas": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route new Qwen MaaS model via Vertex OpenAPI path

This model is registered as format: "openai" on Vertex, so calls will go through fetchOpenAI, but that function only routes publishers/meta/... models to .../endpoints/openapi/chat/completions and sends all other publishers to :rawPredict after rewriting the model name. Because this new entry is another *-maas model (publishers/qwen/...-maas), it will follow the non-Meta branch and be invoked with the wrong Vertex path/model rewrite for chat-completions requests, causing runtime request failures for users selecting this model.

Useful? React with 👍 / 👎.

"format": "openai",
"flavor": "chat",
"input_cost_per_mil_tokens": 0.22,
"output_cost_per_mil_tokens": 0.88,
"displayName": "Qwen3 235B A22B Instruct 2507",
"max_input_tokens": 262144,
"max_output_tokens": 16384,
"locations": ["global", "us-south1"]
},
"accounts/fireworks/models/deepseek-v3p2": {
"format": "openai",
"flavor": "chat",
Expand Down
11 changes: 9 additions & 2 deletions packages/proxy/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1952,10 +1952,17 @@ async function fetchOpenAI(
const location = locations[Math.floor(Math.random() * locations.length)];
const baseURL = getVertexBaseUrl(api_base, location);

if (bodyData?.model?.startsWith("publishers/meta")) {
if (
bodyData?.model?.startsWith("publishers/meta") ||
bodyData?.model?.startsWith("publishers/qwen")
) {
// Use the OpenAPI endpoint.
// Meta models use v1beta1, Qwen models use v1
const apiVersion = bodyData.model.startsWith("publishers/meta")
? "v1beta1"
: "v1";
fullURL = new URL(
`${baseURL}/v1beta1/projects/${project}/locations/${location}/endpoints/openapi/chat/completions`,
`${baseURL}/${apiVersion}/projects/${project}/locations/${location}/endpoints/openapi/chat/completions`,
);
bodyData.model = bodyData.model.replace(
/^publishers\/(\w+)\/models\//,
Expand Down