[feat] Provider model capability: make serviceTier options authoritative

Aperta
#2,248 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by tracing where provider.management replies are built and how the serviceTier capability is represented and validated; the issue does not name those Rust files or tests. Then check the Desktop fallback at packages/desktop/packages/renderer/src/components/chat-workspace/model-selector/model-options.ts to understand the client behavior. Done means replies cannot advertise supported: true with unusable options, and tests cover supported with and without options and unsupported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

core design enhancement P1

Problem / Context

provider.management can report serviceTier.supported: true while omitting options. The Electron Desktop then invents ['default', 'priority'] in packages/desktop/packages/renderer/src/components/chat-workspace/model-selector/model-options.ts and shows choices the owner never advertised. A user can select one of those values and the owner may reject it.

The same shape is used by all clients; a client-side fallback makes the capability contract ambiguous.

Proposal

Make the capability authoritative:

  • when serviceTier.supported === true, include a non-empty options array and, if there is a default, a default contained in options;
  • when the options cannot be enumerated, set supported: false or add an explicit optionsKnown: false that clients must treat as unavailable;
  • validate the field when building provider.management replies.

Why this belongs in App Server

Provider/model capabilities are owner data. A client cannot know which service tiers the route accepts. Inventing options can display an unsupported choice and turn a UI control into a failed write.

If upstream declines

Desktop will hide the service-tier control whenever options is absent, instead of inventing values. No local capability table will be added.

Acceptance

  • A model with supported: true always has a usable, declared option set (or an explicit unknown state).
  • Desktop does not need a hard-coded fallback list.
  • Older clients that already ignore the field remain compatible.
  • Tests cover supported with/without options and unsupported.

Boundaries

  • No provider catalog fallback in clients.
  • No new service-tier store.
  • No change to how a valid tier is applied.

Related

  • Desktop tracking issue will be linked in a comment.
  • Desktop model provider catalog cleanup (will be linked)
Lingua principale
Rust
Stelle
584
Fork
42
Merge medio
9h 41m
PR unite (30g)
929

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di arcships/dim

Tutte le issue di arcships/dim

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.