Introduce formal model discovery modes (e.g., models, manual, static-hint) to categorize and manage how providers discover models, moving beyond the assumption of a universal /models endpoint and accommodating various scenarios like static models, manual input, or inference-only endpoints.
# [Feature]: 正式建模模型发现模式 / Formalize provider model discovery modes ## Problem / pain point / 问题 当前代码已经承认 `/models` 不是通用前提,但模型发现仍然大多围绕“provider 应该有 listing endpoint”来组织。 实际上 provider 至少分成几类: - 标准 `/models` - 静态已知模型 - 手工输入 model ID - inference-only endpoint,没有 listing - imported config,仅有一个已知默认模型 Without formal discovery modes, the product keeps re-learning the same provider-specific edge cases. ## Proposed solution / 方案 引入 `modelDiscoveryMode`,例如: - `models` - `manual` - `static-hint` - `infer-only` 并用它驱动: - connection tests - model picker UX - import defaults - diagnostics wording ## Alternatives considered / 备选方案 - 继续让每条 provider 路径单独处理 discovery - 逻辑会不断重复 ## Scope / 范围 Provider / model ## Acceptance criteria / 验收标准 - provider entry 可声明 discovery mode - `models:v1:list-for-provider` 会尊重该 mode - Settings UI 能表达 manual/static 而不是强依赖远程 discover - diagnostics 不再把“没有 `/models`”视为统一失败 - built-ins 与 imports 都有合理 mode ## Likely touchpoints / 可能涉及 - `apps/desktop/src/main/c