fix(ui): shorten default reasoning labels

This commit is contained in:
Yichen Jiang
2026-07-30 00:57:38 +08:00
parent 1e98797e7a
commit 15eaac6af5
7 changed files with 16 additions and 16 deletions

View File

@@ -75,10 +75,10 @@ export function compactTargetLabel(target: AgentLlmTarget): string {
* Resolve the display label for a choice's reasoning effort.
* @param choice - The model choice carrying advertised reasoning metadata.
* @param effort - The selected effort, or `undefined` for provider default.
* @returns The effort's display name, `provider default`, or `undefined` when the model has no reasoning metadata.
* @returns The effort's display name, `Default`, or `undefined` when the model has no reasoning metadata.
*/
export function targetReasoningLabel(choice: ModelChoice, effort: ReasoningEffortId | undefined): string | undefined {
if (effort === undefined) return choice.reasoning === undefined ? undefined : 'provider default'
if (effort === undefined) return choice.reasoning === undefined ? undefined : 'Default'
return choice.reasoning?.efforts.find(candidate => candidate.id === effort)?.name ?? effort
}