Effort selector dropdown hidden for GLM models — blocks access to GLM-5.2 High/Max effort tiers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia leggendo il gate effort-selector in src/components/chat/MessageInput.tsx e le voci delle capacità dei modelli in src/lib/provider-catalog.ts; poi individua dove sono definiti i modelli env-provider. Controlla come il menu a discesa gestisce supportedEffortLevels prima di scegliere quali modelli e livelli esporre. Il lavoro è completato quando gli utenti GLM possono selezionare i livelli di effort supportati e il valore di effort esistente continua a essere trasmesso nella richiesta di chat.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When using a GLM model (e.g. GLM-5.2 via Z.ai's Anthropic-compatible endpoint at https://api.z.ai/api/anthropic), the effort selector dropdown does not render in the chat composer. This prevents users from selecting GLM-5.2's High and Max reasoning effort tiers, even though the downstream plumbing already carries the effort field end-to-end and Z.ai's endpoint accepts it.
Environment
- CodePilot: v0.56.0 (source HEAD
b4e96a1) - OS: Windows 11
- Provider: env (Claude Code SDK runtime)
- Endpoint:
https://api.z.ai/api/anthropic - Model:
glm-5.2[1m]
Root cause
The dropdown visibility is gated by a model capability flag that GLM does not have.
src/components/chat/MessageInput.tsx:991-992:
```tsx
const currentModelMeta = currentModelOption as (typeof currentModelOption & { supportsEffort?: boolean; supportedEffortLevels?: string[] }) | undefined;
const showEffortSelector = currentModelMeta?.supportsEffort === true;
```
supportsEffort: true is set on Claude variants in src/lib/provider-catalog.ts (Sonnet / Opus / Haiku roles, plus Fable 5 at lines 240, 250, 260, 290, 301, 314, 325, 344, 355, 370, 385, 396, 428, 437) but not on GLM models configured via the env provider. When a user selects GLM, currentModelMeta.supportsEffort is undefined, so showEffortSelector is false and the dropdown never renders. There is no way inside the UI to set selectedEffort to anything other than the 'auto' default.
The downstream plumbing already works
Once selectedEffort is anything other than 'auto', the value flows through cleanly:
src/app/chat/page.tsx:890:
```tsx
...(selectedEffort && selectedEffort !== 'auto' ? { effort: selectedEffort } : {}),
```
src/lib/claude-model-options.ts:102-144 (sanitizeClaudeModelOptions) passes effort through unchanged for any model that isn't Opus 4.7/4.8/Fable 5. GLM matches neither the OPUS_ADAPTIVE_THINKING_PATTERN nor the FABLE_PATTERN, so effort: 'max' would reach Z.ai's endpoint as-is.
The EffortSelectorDropdown itself also already falls back to the full 5-level set when supportedEffortLevels is undefined:
src/components/chat/EffortSelectorDropdown.tsx:36:
```tsx
const baseLevels = supportedEffortLevels || ['low', 'medium', 'high', 'xhigh', 'max'];
```
So the only thing missing is the capability flag on GLM model entries.
GLM-5.2 does support effort tiers
Per Z.ai's "How to Switch Models" doc:
"In a Claude Code session, type the /effort command to switch thinking intensity. After switching, Claude Code maps the selected effort to GLM-5.2's actual effort levels..."
GLM-5.2 exposes at least High and Max effort tiers. Users running the Claude Code CLI directly against Z.ai can reach them via /effort max. CodePilot users cannot, because the UI gate is closed. (CodePilot also does not forward /effort as a slash command to the underlying SDK, so there's no escape hatch.)
Suggested fixes
In order of preference:
-
Mark env-provider models with
supportsEffort: trueby default so the dropdown renders for any Anthropic-compatible endpoint (GLM, DeepSeek, Kimi, etc.). Downstream code handles unknown effort values gracefully, and the endpoint will either accept the level or ignore it. -
Add explicit GLM entries to
ENV_CLAUDE_CODE_MODELSwithsupportedEffortLevels: ['high', 'max']matching what Z.ai's endpoint actually documents, so the dropdown surfaces only the levels GLM-5.2 truly supports.
Workaround
None inside CodePilot today. Switching to Opus surfaces the dropdown (Opus has supportsEffort: true), but that's not a real fix for users who chose GLM for cost or quota reasons.
- Lingua principale
- TypeScript
- Stelle
- 6.5k
- Fork
- 697
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di op7418/CodePilot
-
发生错误时提醒Error:successApertabug P0-crash-or-interrupt
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug P0-crash-or-interrupt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
无法正常应用内更新Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di op7418/CodePilot
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
backnotprop/plannotator#2914 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/vscode-containers#655 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · 1 commento ·