mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-04 12:41:15 +08:00
feat: add Claude and Codex effort controls (#943)
* feat: add Claude and Codex effort controls * refactor: generic provider effort handling * fix: reconcile provider effort after model changes * fix: pass effort through external agent api * feat: add effort support for opencode * chore: update gpt fallback models * fix: use portal for showing effort dropdown --------- Co-authored-by: Haileyesus <118998054+blackmammoth@users.noreply.github.com>
This commit is contained in:
13
src/components/chat/constants/providerEffort.ts
Normal file
13
src/components/chat/constants/providerEffort.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { LLMProvider, ProviderModelOption } from '../../../types/app';
|
||||
|
||||
export const DEFAULT_EFFORT_VALUE = 'default';
|
||||
|
||||
export const FALLBACK_PROVIDER_EFFORT_VALUES: Partial<Record<LLMProvider, readonly string[]>> = {
|
||||
claude: ['low', 'medium', 'high', 'xhigh', 'max'],
|
||||
codex: ['low', 'medium', 'high', 'xhigh'],
|
||||
opencode: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
|
||||
};
|
||||
|
||||
export const toProviderEffortOptions = (
|
||||
values: readonly string[],
|
||||
): NonNullable<ProviderModelOption['effort']>['values'] => values.map((value) => ({ value }));
|
||||
Reference in New Issue
Block a user