opencode-go fetcher: skip models whose declared type is not chat

Aberta
#2,679 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
22/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
api

Direção de pesquisa

The filter is meant to live in src/api/providers/fetchers/opencode-go.ts, and the spec skips models whose type is not chat (maintainer review) is in src/api/providers/fetchers/tests/opencode-go.spec.ts. The issue says this is already implemented on PR #2646, so first check that PR's diff and the maintainer's review item before writing anything. Done means the filter and its spec are tracked as their own scoped piece of work, and the TLA+ OnlyChatListed invariant in docs/architecture/tla/OpencodeGoModelMerge.tla still holds.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Current behavior

The OpenCode Go /models fetcher (src/api/providers/fetchers/opencode-go.ts) now skips any model whose endpoint-declared type is neither chat nor absent. Entries without a type field stay listed, so older responses that lack the discriminator are unaffected:

// Only chat models belong in the picker; an embedding or other
// type would surface as an unusable choice. Entries without a
// type stay listed for older responses (maintainer review).
if (parsed.data.type !== undefined && parsed.data.type !== "chat") {
	continue
}

Why

The current /models endpoint publishes a type discriminator alongside limit.context, limit.output and modalities.input. An embedding or other non-chat model would otherwise surface in the chat model picker as an unusable choice.

This behavior was explicitly requested by maintainer @edelauna in their review of PR #2646 (review 6033833085, item: "Skip models whose type is not chat").

Scope

The type filter is implemented and tested on PR #2646: covered by the skips models whose type is not chat (maintainer review) spec in src/api/providers/fetchers/__tests__/opencode-go.spec.ts, and by the OnlyChatListed invariant with its OpencodeGoModelMerge.NoTypeFilter.cfg sabotage config in docs/architecture/tla/OpencodeGoModelMerge.tla. This issue tracks the filter as its own scoped piece of work so PR #2646 can list it as in-scope.

Linguagem predominante
TypeScript
Estrelas
2k
Forks
301
Merge médio
3d 14h
PRs com merge (30d)
103

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Zoo-Code-Org/Zoo-Code

Todas as issues de Zoo-Code-Org/Zoo-Code

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.