fix(ai): route GitHub Copilot MAI-Code models through /responses endpoint (#6544)
mai-code-1-flash-picker is not accessible via /chat/completions and must use the Copilot /responses endpoint. Update generate-models.ts to send mai-* models to the responses API and regenerate the affected model entry.
This commit is contained in:
@@ -1463,8 +1463,10 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
||||
|
||||
// Claude 4.x and 5.x models route to Anthropic Messages API
|
||||
const isCopilotClaude = /^claude-(haiku|sonnet|opus)-[45]([.\-]|$)/.test(modelId);
|
||||
// gpt-5 models require responses API, others use completions
|
||||
const needsResponsesApi = modelId.startsWith("gpt-5") || modelId.startsWith("oswe");
|
||||
// gpt-5, oswe, and MAI-Code models are only served through the
|
||||
// Copilot /responses endpoint.
|
||||
const needsResponsesApi =
|
||||
modelId.startsWith("gpt-5") || modelId.startsWith("oswe") || modelId.startsWith("mai-");
|
||||
|
||||
const api: Api = isCopilotClaude
|
||||
? "anthropic-messages"
|
||||
|
||||
Reference in New Issue
Block a user