Skip to content

[FEATURE] Display only the list of enabled models #62

Description

@jmontornes-emdep

✨ 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 });

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions