fix: add missing chatgptModels.ts, xhigh type support, and tsconfig fixes

This commit is contained in:
James Feng 2026-06-01 23:54:46 +08:00
parent c4b3dd1f50
commit 19597a2067
3 changed files with 56 additions and 2 deletions

View File

@ -169,7 +169,7 @@ export async function call(
if (COMMON_HELP_ARGS.includes(args)) {
onDone(
'Usage: /effort [low|medium|high|max|auto]\n\nEffort levels:\n- low: Quick, straightforward implementation\n- medium: Balanced approach with standard testing\n- high: Comprehensive implementation with extensive testing\n- max: Maximum capability with deepest reasoning\n- auto: Use the default effort level for your model',
'Usage: /effort [low|medium|high|max|xhigh|auto]\\n\\nEffort levels:\\n- low: Quick, straightforward implementation\\n- medium: Balanced approach with standard testing\\n- high: Comprehensive implementation with extensive testing\\n- xhigh: Extended reasoning beyond high\\n- max: Maximum capability with deepest reasoning\\n- auto: Use the default effort level for your model',
)
return
}

View File

@ -60,4 +60,4 @@ export interface Query {
export interface InternalQuery extends Query {
[key: string]: unknown
}
export type EffortLevel = 'low' | 'medium' | 'high' | 'max';
export type EffortLevel = 'low' | 'medium' | 'high' | 'max' | 'xhigh';

View File

@ -0,0 +1,54 @@
export type ChatGPTCodexModelOption = {
value: string
label: string
description: string
}
export const CHATGPT_CODEX_DEFAULT_MODEL = 'gpt-5.5'
export const CHATGPT_CODEX_FAST_MODEL = 'gpt-5.4-mini'
export const CHATGPT_CODEX_MODEL_OPTIONS: ChatGPTCodexModelOption[] = [
{
value: 'gpt-5.5',
label: 'GPT-5.5',
description:
'Frontier model for complex coding, research, and real-world work',
},
{
value: 'gpt-5.4',
label: 'GPT-5.4',
description: 'Strong model for everyday coding',
},
{
value: 'gpt-5.4-mini',
label: 'GPT-5.4-Mini',
description:
'Small, fast, and cost-efficient model for simpler coding tasks',
},
{
value: 'gpt-5.3-codex',
label: 'GPT-5.3-Codex',
description: 'Coding-optimized model',
},
{
value: 'gpt-5.3-codex-spark',
label: 'GPT-5.3-Codex-Spark',
description: 'Ultra-fast coding model',
},
{
value: 'gpt-5.2',
label: 'GPT-5.2',
description: 'Optimized for professional work and long-running agents',
},
]
export function isChatGPTAuthMode(): boolean {
return process.env.OPENAI_AUTH_MODE === 'chatgpt'
}
export function isChatGPTCodexReasoningModel(model: string): boolean {
const normalized = model.toLowerCase().replace(/\[1m\]$/, '')
return CHATGPT_CODEX_MODEL_OPTIONS.some(
option => option.value.toLowerCase() === normalized,
)
}