refactor: update Codex models to latest OpenAI models

- Replace gpt-5-codex, gpt-5-codex-mini, codex-1, codex-mini-latest, gpt-5
- Add gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.2, gpt-5.1
- Update thinking support for all Codex models
This commit is contained in:
DhanushSantosh
2026-01-08 14:22:35 +05:30
parent d1bd131cab
commit 4d80a93710
7 changed files with 131 additions and 168 deletions

View File

@@ -1,6 +1,7 @@
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
import type { ModelAlias, ModelProvider } from '@/store/app-store';
import { CODEX_MODEL_CONFIG_MAP, codexModelHasThinking } from '@automaker/types';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
@@ -10,6 +11,13 @@ export function cn(...inputs: ClassValue[]) {
* Determine if the current model supports extended thinking controls
*/
export function modelSupportsThinking(_model?: ModelAlias | string): boolean {
if (!_model) return true;
// Check if it's a Codex model with thinking support
if (_model.startsWith('gpt-') && _model in CODEX_MODEL_CONFIG_MAP) {
return codexModelHasThinking(_model as any);
}
// All Claude models support thinking
return true;
}