mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
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:
@@ -4,12 +4,11 @@
|
||||
* Reference: https://developers.openai.com/codex/models/
|
||||
*/
|
||||
export type CodexModelId =
|
||||
| 'gpt-5.2-codex' // Most advanced agentic coding model for complex software engineering
|
||||
| 'gpt-5-codex' // Purpose-built for Codex CLI with versatile tool use
|
||||
| 'gpt-5-codex-mini' // Faster workflows optimized for low-latency code Q&A and editing
|
||||
| 'codex-1' // Version of o3 optimized for software engineering
|
||||
| 'codex-mini-latest' // Version of o4-mini for Codex, optimized for faster workflows
|
||||
| 'gpt-5'; // GPT-5 base flagship model
|
||||
| 'gpt-5.2-codex'
|
||||
| 'gpt-5.1-codex-max'
|
||||
| 'gpt-5.1-codex-mini'
|
||||
| 'gpt-5.2'
|
||||
| 'gpt-5.1';
|
||||
|
||||
/**
|
||||
* Codex model metadata
|
||||
@@ -32,40 +31,33 @@ export const CODEX_MODEL_CONFIG_MAP: Record<CodexModelId, CodexModelConfig> = {
|
||||
label: 'GPT-5.2-Codex',
|
||||
description: 'Most advanced agentic coding model for complex software engineering',
|
||||
hasThinking: true,
|
||||
supportsVision: true, // GPT-5 supports vision
|
||||
supportsVision: true,
|
||||
},
|
||||
'gpt-5-codex': {
|
||||
id: 'gpt-5-codex',
|
||||
label: 'GPT-5-Codex',
|
||||
description: 'Purpose-built for Codex CLI with versatile tool use',
|
||||
'gpt-5.1-codex-max': {
|
||||
id: 'gpt-5.1-codex-max',
|
||||
label: 'GPT-5.1-Codex-Max',
|
||||
description: 'Optimized for long-horizon, agentic coding tasks in Codex',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'gpt-5-codex-mini': {
|
||||
id: 'gpt-5-codex-mini',
|
||||
label: 'GPT-5-Codex-Mini',
|
||||
description: 'Faster workflows optimized for low-latency code Q&A and editing',
|
||||
'gpt-5.1-codex-mini': {
|
||||
id: 'gpt-5.1-codex-mini',
|
||||
label: 'GPT-5.1-Codex-Mini',
|
||||
description: 'Smaller, more cost-effective version for faster workflows',
|
||||
hasThinking: false,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-1': {
|
||||
id: 'codex-1',
|
||||
label: 'Codex-1',
|
||||
description: 'Version of o3 optimized for software engineering',
|
||||
'gpt-5.2': {
|
||||
id: 'gpt-5.2',
|
||||
label: 'GPT-5.2',
|
||||
description: 'Best general agentic model for tasks across industries and domains',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-mini-latest': {
|
||||
id: 'codex-mini-latest',
|
||||
label: 'Codex-Mini-Latest',
|
||||
description: 'Version of o4-mini for Codex, optimized for faster workflows',
|
||||
hasThinking: false,
|
||||
supportsVision: true,
|
||||
},
|
||||
'gpt-5': {
|
||||
id: 'gpt-5',
|
||||
label: 'GPT-5',
|
||||
description: 'GPT-5 base flagship model',
|
||||
'gpt-5.1': {
|
||||
id: 'gpt-5.1',
|
||||
label: 'GPT-5.1',
|
||||
description: 'Great for coding and agentic tasks across domains',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
|
||||
@@ -74,47 +74,39 @@ export const CODEX_MODELS: (ModelOption & { hasReasoning?: boolean })[] = [
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt52Codex,
|
||||
label: 'GPT-5.2-Codex',
|
||||
description: 'Most advanced agentic coding model (default for ChatGPT users).',
|
||||
description: 'Most advanced agentic coding model for complex software engineering.',
|
||||
badge: 'Premium',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5Codex,
|
||||
label: 'GPT-5-Codex',
|
||||
description: 'Purpose-built for Codex CLI (default for CLI users).',
|
||||
badge: 'Balanced',
|
||||
id: CODEX_MODEL_MAP.gpt51CodexMax,
|
||||
label: 'GPT-5.1-Codex-Max',
|
||||
description: 'Optimized for long-horizon, agentic coding tasks in Codex.',
|
||||
badge: 'Premium',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5CodexMini,
|
||||
label: 'GPT-5-Codex-Mini',
|
||||
description: 'Faster workflows for code Q&A and editing.',
|
||||
id: CODEX_MODEL_MAP.gpt51CodexMini,
|
||||
label: 'GPT-5.1-Codex-Mini',
|
||||
description: 'Smaller, more cost-effective version for faster workflows.',
|
||||
badge: 'Speed',
|
||||
provider: 'codex',
|
||||
hasReasoning: false,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.codex1,
|
||||
label: 'Codex-1',
|
||||
description: 'o3-based model optimized for software engineering.',
|
||||
badge: 'Premium',
|
||||
id: CODEX_MODEL_MAP.gpt52,
|
||||
label: 'GPT-5.2',
|
||||
description: 'Best general agentic model for tasks across industries and domains.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.codexMiniLatest,
|
||||
label: 'Codex-Mini-Latest',
|
||||
description: 'o4-mini-based model for faster workflows.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: false,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5,
|
||||
label: 'GPT-5',
|
||||
description: 'GPT-5 base flagship model.',
|
||||
id: CODEX_MODEL_MAP.gpt51,
|
||||
label: 'GPT-5.1',
|
||||
description: 'Great for coding and agentic tasks across domains.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
@@ -203,11 +195,10 @@ export function getModelDisplayName(model: ModelAlias | string): string {
|
||||
sonnet: 'Claude Sonnet',
|
||||
opus: 'Claude Opus',
|
||||
[CODEX_MODEL_MAP.gpt52Codex]: 'GPT-5.2-Codex',
|
||||
[CODEX_MODEL_MAP.gpt5Codex]: 'GPT-5-Codex',
|
||||
[CODEX_MODEL_MAP.gpt5CodexMini]: 'GPT-5-Codex-Mini',
|
||||
[CODEX_MODEL_MAP.codex1]: 'Codex-1',
|
||||
[CODEX_MODEL_MAP.codexMiniLatest]: 'Codex-Mini-Latest',
|
||||
[CODEX_MODEL_MAP.gpt5]: 'GPT-5',
|
||||
[CODEX_MODEL_MAP.gpt51CodexMax]: 'GPT-5.1-Codex-Max',
|
||||
[CODEX_MODEL_MAP.gpt51CodexMini]: 'GPT-5.1-Codex-Mini',
|
||||
[CODEX_MODEL_MAP.gpt52]: 'GPT-5.2',
|
||||
[CODEX_MODEL_MAP.gpt51]: 'GPT-5.1',
|
||||
};
|
||||
return displayNames[model] || model;
|
||||
}
|
||||
|
||||
@@ -13,21 +13,19 @@ export const CLAUDE_MODEL_MAP: Record<string, string> = {
|
||||
* See: https://developers.openai.com/codex/models/
|
||||
*/
|
||||
export const CODEX_MODEL_MAP = {
|
||||
// Codex-specific models
|
||||
// Recommended Codex-specific models
|
||||
/** Most advanced agentic coding model for complex software engineering (default for ChatGPT users) */
|
||||
gpt52Codex: 'gpt-5.2-codex',
|
||||
/** Purpose-built for Codex CLI with versatile tool use (default for CLI users) */
|
||||
gpt5Codex: 'gpt-5-codex',
|
||||
/** Faster workflows optimized for low-latency code Q&A and editing */
|
||||
gpt5CodexMini: 'gpt-5-codex-mini',
|
||||
/** Version of o3 optimized for software engineering */
|
||||
codex1: 'codex-1',
|
||||
/** Version of o4-mini for Codex, optimized for faster workflows */
|
||||
codexMiniLatest: 'codex-mini-latest',
|
||||
/** Optimized for long-horizon, agentic coding tasks in Codex */
|
||||
gpt51CodexMax: 'gpt-5.1-codex-max',
|
||||
/** Smaller, more cost-effective version for faster workflows */
|
||||
gpt51CodexMini: 'gpt-5.1-codex-mini',
|
||||
|
||||
// Base GPT-5 model (also available in Codex)
|
||||
/** GPT-5 base flagship model */
|
||||
gpt5: 'gpt-5',
|
||||
// General-purpose GPT models (also available in Codex)
|
||||
/** Best general agentic model for tasks across industries and domains */
|
||||
gpt52: 'gpt-5.2',
|
||||
/** Great for coding and agentic tasks across domains */
|
||||
gpt51: 'gpt-5.1',
|
||||
} as const;
|
||||
|
||||
export const CODEX_MODEL_IDS = Object.values(CODEX_MODEL_MAP);
|
||||
@@ -38,9 +36,9 @@ export const CODEX_MODEL_IDS = Object.values(CODEX_MODEL_MAP);
|
||||
*/
|
||||
export const REASONING_CAPABLE_MODELS = new Set([
|
||||
CODEX_MODEL_MAP.gpt52Codex,
|
||||
CODEX_MODEL_MAP.gpt5Codex,
|
||||
CODEX_MODEL_MAP.gpt5,
|
||||
CODEX_MODEL_MAP.codex1, // o3-based model
|
||||
CODEX_MODEL_MAP.gpt51CodexMax,
|
||||
CODEX_MODEL_MAP.gpt52,
|
||||
CODEX_MODEL_MAP.gpt51,
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user