Skip to content

Commit 50c0c61

Browse files
authored
fix(scripts): retain web_fetch in OpenRouter tool-capability codegen (#657)
generateChatToolCapabilitiesType emitted readonly ['web_search'] only, so regenerating model-meta.ts dropped web_fetch from every chat model's tool capabilities. Emit both web_search and web_fetch to match the committed model-meta.ts, and update the doc comment accordingly.
1 parent 980ff9b commit 50c0c61

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/convert-openrouter-models.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ function generateChatModelsArray(): string {
6565
}
6666

6767
/**
68-
* OpenRouter's web_search plugin works across all chat models via the gateway,
69-
* so the tool-capability map is structural and identical for every chat model.
70-
* Emitted as a mapped type to stay in sync with OPENROUTER_CHAT_MODELS without
71-
* touching each model constant.
68+
* OpenRouter's web_search and web_fetch plugins work across all chat models via
69+
* the gateway, so the tool-capability map is structural and identical for every
70+
* chat model. Emitted as a mapped type to stay in sync with
71+
* OPENROUTER_CHAT_MODELS without touching each model constant.
7272
*/
7373
function generateChatToolCapabilitiesType(): string {
7474
if (chatModels.size === 0) {
7575
return ''
7676
}
77-
return `export type OpenRouterChatModelToolCapabilitiesByName = {\n [K in (typeof OPENROUTER_CHAT_MODELS)[number]]: readonly ['web_search']\n}`
77+
return `export type OpenRouterChatModelToolCapabilitiesByName = {\n [K in (typeof OPENROUTER_CHAT_MODELS)[number]]: readonly ['web_search', 'web_fetch']\n}`
7878
}
7979

8080
function generateImageModelsArray(): string {

0 commit comments

Comments
 (0)