[feat] Provider model capability: make serviceTier options authoritative

オープン
#2,248 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
Rust
スター
584
フォーク
42
平均マージ
9時間 41分
マージ済み PR(30日)
929

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

arcships/dim のほかの issue

arcships/dim の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。