{"schemaVersion":1,"id":"2026-11-16-ai-routes-caller-key","status":"draft","source":{"kind":"entry-mdx","path":"apps/www/src/registry/changelog/entries/2026-11-16-ai-routes-caller-key.mdx"},"change":{"type":"source","date":"2026-11-16","commits":[]},"release":{"status":"unresolved"},"kind":"fix","summary":"Use only the caller's own AI Gateway key in the AI routes","targets":[{"name":"ai-api","files":["apps/www/src/registry/app/api/ai/command/prompt/common.ts","apps/www/src/registry/app/api/ai/command/prompt/getChooseToolPrompt.ts","apps/www/src/registry/app/api/ai/command/prompt/getCommentPrompt.ts","apps/www/src/registry/app/api/ai/command/prompt/getEditPrompt.ts","apps/www/src/registry/app/api/ai/command/prompt/getEditTablePrompt.ts","apps/www/src/registry/app/api/ai/command/prompt/getGeneratePrompt.ts","apps/www/src/registry/app/api/ai/command/route.ts","apps/www/src/registry/app/api/ai/command/utils.ts"],"definitionFiles":["apps/www/src/registry/registry-components.ts"],"diagnostics":[]},{"name":"copilot-api","files":["apps/www/src/registry/app/api/ai/copilot/route.ts"],"definitionFiles":["apps/www/src/registry/registry-components.ts"],"diagnostics":[]}],"entries":[{"id":"2026-11-16-ai-api-caller-s-own-gateway-788e97a5","kind":"fix","summary":"Use only the AI Gateway key the caller sends as `apiKey`. A request without one gets a 401, even when the server sets `AI_GATEWAY_API_KEY`. To use a shared key, authenticate and authorize each request in your route and load the key on the server.","details":[],"migrationNotes":["Send the caller's AI Gateway key as apiKey in the request body, or authorize each request and load a shared key on the server."],"targets":["ai-api","copilot-api"],"source":{"line":14,"row":1,"legacyRelease":{"date":"2026-11-16","entry":"2026-11-16-ai-routes-caller-key","section":null}}}],"diagnostics":[]}