✨ The feature
In Opencode ZEN, the list of available models includes all supported models, although the ones disabled from opencode.ai
🎯 The problem
A lot of models are listed, some of them very obsolete, although disabled from OpenCode web page
💡 Proposed solution
When fetching the models add the api key in the header. In this way, only the enabled models are included in the response.
It can be achieved just by modifying the extension.ts->fetchModels function:
private async fetchModels(): Promise<string[]> { try { const apiKey = await this.context.secrets.get(SECRET_KEY); const headers: Record<string, string> = {}; if (apiKey) { headers["Authorization"] =Bearer ${apiKey}; } const response = await fetch(this.definition.modelsUrl, { headers });

✨ The feature
In Opencode ZEN, the list of available models includes all supported models, although the ones disabled from opencode.ai
🎯 The problem
A lot of models are listed, some of them very obsolete, although disabled from OpenCode web page
💡 Proposed solution
When fetching the models add the api key in the header. In this way, only the enabled models are included in the response.
It can be achieved just by modifying the extension.ts->fetchModels function:
private async fetchModels(): Promise<string[]> { try { const apiKey = await this.context.secrets.get(SECRET_KEY); const headers: Record<string, string> = {}; if (apiKey) { headers["Authorization"] =Bearer ${apiKey}; } const response = await fetch(this.definition.modelsUrl, { headers });