mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-20 11:03:08 +00:00
feat: Add GPT-5 model variants and improve Codex execution logic. Addressed code review comments
This commit is contained in:
@@ -7,11 +7,16 @@
|
||||
*/
|
||||
export type CodexModelId =
|
||||
| 'codex-gpt-5.3-codex'
|
||||
| 'codex-gpt-5.3-codex-spark'
|
||||
| 'codex-gpt-5.2-codex'
|
||||
| 'codex-gpt-5.1-codex-max'
|
||||
| 'codex-gpt-5.1-codex-mini'
|
||||
| 'codex-gpt-5.1-codex'
|
||||
| 'codex-gpt-5-codex'
|
||||
| 'codex-gpt-5-codex-mini'
|
||||
| 'codex-gpt-5.2'
|
||||
| 'codex-gpt-5.1';
|
||||
| 'codex-gpt-5.1'
|
||||
| 'codex-gpt-5';
|
||||
|
||||
/**
|
||||
* Codex model metadata
|
||||
@@ -37,6 +42,13 @@ export const CODEX_MODEL_CONFIG_MAP: Record<CodexModelId, CodexModelConfig> = {
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5.3-codex-spark': {
|
||||
id: 'codex-gpt-5.3-codex-spark',
|
||||
label: 'GPT-5.3-Codex-Spark',
|
||||
description: 'Near-instant real-time coding model, 1000+ tokens/sec',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5.2-codex': {
|
||||
id: 'codex-gpt-5.2-codex',
|
||||
label: 'GPT-5.2-Codex',
|
||||
@@ -58,6 +70,27 @@ export const CODEX_MODEL_CONFIG_MAP: Record<CodexModelId, CodexModelConfig> = {
|
||||
hasThinking: false,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5.1-codex': {
|
||||
id: 'codex-gpt-5.1-codex',
|
||||
label: 'GPT-5.1-Codex',
|
||||
description: 'Original GPT-5.1 Codex agentic coding model',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5-codex': {
|
||||
id: 'codex-gpt-5-codex',
|
||||
label: 'GPT-5-Codex',
|
||||
description: 'Original GPT-5 Codex model',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5-codex-mini': {
|
||||
id: 'codex-gpt-5-codex-mini',
|
||||
label: 'GPT-5-Codex-Mini',
|
||||
description: 'Smaller, cheaper GPT-5 Codex variant',
|
||||
hasThinking: false,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5.2': {
|
||||
id: 'codex-gpt-5.2',
|
||||
label: 'GPT-5.2 (Codex)',
|
||||
@@ -72,6 +105,13 @@ export const CODEX_MODEL_CONFIG_MAP: Record<CodexModelId, CodexModelConfig> = {
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
'codex-gpt-5': {
|
||||
id: 'codex-gpt-5',
|
||||
label: 'GPT-5 (Codex)',
|
||||
description: 'Base GPT-5 model via Codex',
|
||||
hasThinking: true,
|
||||
supportsVision: true,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,8 @@ export type ErrorType =
|
||||
| 'execution'
|
||||
| 'rate_limit'
|
||||
| 'quota_exhausted'
|
||||
| 'model_not_found'
|
||||
| 'stream_disconnected'
|
||||
| 'unknown';
|
||||
|
||||
/**
|
||||
@@ -21,6 +23,8 @@ export interface ErrorInfo {
|
||||
isCancellation: boolean;
|
||||
isRateLimit: boolean;
|
||||
isQuotaExhausted: boolean; // Session/weekly usage limit reached
|
||||
isModelNotFound: boolean; // Model does not exist or user lacks access
|
||||
isStreamDisconnected: boolean; // Stream disconnected before completion
|
||||
retryAfter?: number; // Seconds to wait before retrying (for rate limit errors)
|
||||
originalError: unknown;
|
||||
}
|
||||
|
||||
@@ -60,14 +60,35 @@ export type EventType =
|
||||
| 'cherry-pick:success'
|
||||
| 'cherry-pick:conflict'
|
||||
| 'cherry-pick:failure'
|
||||
| 'cherry-pick:verify-failed'
|
||||
| 'cherry-pick:abort'
|
||||
| 'rebase:started'
|
||||
| 'rebase:success'
|
||||
| 'rebase:conflict'
|
||||
| 'rebase:failure'
|
||||
| 'stash:start'
|
||||
| 'stash:progress'
|
||||
| 'stash:conflicts'
|
||||
| 'stash:success'
|
||||
| 'stash:failure'
|
||||
| 'merge:start'
|
||||
| 'merge:success'
|
||||
| 'merge:conflict'
|
||||
| 'merge:error'
|
||||
| 'branchCommitLog:start'
|
||||
| 'branchCommitLog:progress'
|
||||
| 'branchCommitLog:done'
|
||||
| 'branchCommitLog:error'
|
||||
| 'commitLog:start'
|
||||
| 'commitLog:progress'
|
||||
| 'commitLog:complete'
|
||||
| 'commitLog:error'
|
||||
| 'switch:start'
|
||||
| 'switch:stash'
|
||||
| 'switch:checkout'
|
||||
| 'switch:pop'
|
||||
| 'switch:done'
|
||||
| 'switch:error'
|
||||
| 'notification:created';
|
||||
|
||||
export type EventCallback = (type: EventType, payload: unknown) => void;
|
||||
|
||||
@@ -80,6 +80,14 @@ export const CODEX_MODELS: (ModelOption & { hasReasoning?: boolean })[] = [
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt53CodexSpark,
|
||||
label: 'GPT-5.3-Codex-Spark',
|
||||
description: 'Near-instant real-time coding model, 1000+ tokens/sec.',
|
||||
badge: 'Speed',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt52Codex,
|
||||
label: 'GPT-5.2-Codex',
|
||||
@@ -104,6 +112,30 @@ export const CODEX_MODELS: (ModelOption & { hasReasoning?: boolean })[] = [
|
||||
provider: 'codex',
|
||||
hasReasoning: false,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt51Codex,
|
||||
label: 'GPT-5.1-Codex',
|
||||
description: 'Original GPT-5.1 Codex agentic coding model.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5Codex,
|
||||
label: 'GPT-5-Codex',
|
||||
description: 'Original GPT-5 Codex model.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5CodexMini,
|
||||
label: 'GPT-5-Codex-Mini',
|
||||
description: 'Smaller, cheaper GPT-5 Codex variant.',
|
||||
badge: 'Speed',
|
||||
provider: 'codex',
|
||||
hasReasoning: false,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt52,
|
||||
label: 'GPT-5.2',
|
||||
@@ -120,6 +152,14 @@ export const CODEX_MODELS: (ModelOption & { hasReasoning?: boolean })[] = [
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
{
|
||||
id: CODEX_MODEL_MAP.gpt5,
|
||||
label: 'GPT-5',
|
||||
description: 'Base GPT-5 model.',
|
||||
badge: 'Balanced',
|
||||
provider: 'codex',
|
||||
hasReasoning: true,
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -222,11 +262,16 @@ export function getModelDisplayName(model: ModelAlias | string): string {
|
||||
sonnet: 'Claude Sonnet',
|
||||
opus: 'Claude Opus',
|
||||
[CODEX_MODEL_MAP.gpt53Codex]: 'GPT-5.3-Codex',
|
||||
[CODEX_MODEL_MAP.gpt53CodexSpark]: 'GPT-5.3-Codex-Spark',
|
||||
[CODEX_MODEL_MAP.gpt52Codex]: 'GPT-5.2-Codex',
|
||||
[CODEX_MODEL_MAP.gpt51CodexMax]: 'GPT-5.1-Codex-Max',
|
||||
[CODEX_MODEL_MAP.gpt51CodexMini]: 'GPT-5.1-Codex-Mini',
|
||||
[CODEX_MODEL_MAP.gpt51Codex]: 'GPT-5.1-Codex',
|
||||
[CODEX_MODEL_MAP.gpt5Codex]: 'GPT-5-Codex',
|
||||
[CODEX_MODEL_MAP.gpt5CodexMini]: 'GPT-5-Codex-Mini',
|
||||
[CODEX_MODEL_MAP.gpt52]: 'GPT-5.2',
|
||||
[CODEX_MODEL_MAP.gpt51]: 'GPT-5.1',
|
||||
[CODEX_MODEL_MAP.gpt5]: 'GPT-5',
|
||||
};
|
||||
|
||||
// Check direct match first
|
||||
|
||||
@@ -52,18 +52,28 @@ export const CODEX_MODEL_MAP = {
|
||||
// Recommended Codex-specific models
|
||||
/** Latest frontier agentic coding model */
|
||||
gpt53Codex: 'codex-gpt-5.3-codex',
|
||||
/** Smaller, near-instant version of GPT-5.3-Codex for real-time coding */
|
||||
gpt53CodexSpark: 'codex-gpt-5.3-codex-spark',
|
||||
/** Frontier agentic coding model */
|
||||
gpt52Codex: 'codex-gpt-5.2-codex',
|
||||
/** Codex-optimized flagship for deep and fast reasoning */
|
||||
gpt51CodexMax: 'codex-gpt-5.1-codex-max',
|
||||
/** Optimized for codex. Cheaper, faster, but less capable */
|
||||
gpt51CodexMini: 'codex-gpt-5.1-codex-mini',
|
||||
/** Original GPT-5.1 Codex model */
|
||||
gpt51Codex: 'codex-gpt-5.1-codex',
|
||||
/** Original GPT-5 Codex model */
|
||||
gpt5Codex: 'codex-gpt-5-codex',
|
||||
/** Smaller, cheaper GPT-5 Codex variant */
|
||||
gpt5CodexMini: 'codex-gpt-5-codex-mini',
|
||||
|
||||
// General-purpose GPT models (also available in Codex)
|
||||
/** Latest frontier model with improvements across knowledge, reasoning and coding */
|
||||
gpt52: 'codex-gpt-5.2',
|
||||
/** Great for coding and agentic tasks across domains */
|
||||
gpt51: 'codex-gpt-5.1',
|
||||
/** Base GPT-5 model */
|
||||
gpt5: 'codex-gpt-5',
|
||||
} as const;
|
||||
|
||||
export const CODEX_MODEL_IDS = Object.values(CODEX_MODEL_MAP);
|
||||
@@ -74,10 +84,14 @@ export const CODEX_MODEL_IDS = Object.values(CODEX_MODEL_MAP);
|
||||
*/
|
||||
export const REASONING_CAPABLE_MODELS = new Set([
|
||||
CODEX_MODEL_MAP.gpt53Codex,
|
||||
CODEX_MODEL_MAP.gpt53CodexSpark,
|
||||
CODEX_MODEL_MAP.gpt52Codex,
|
||||
CODEX_MODEL_MAP.gpt51CodexMax,
|
||||
CODEX_MODEL_MAP.gpt51Codex,
|
||||
CODEX_MODEL_MAP.gpt5Codex,
|
||||
CODEX_MODEL_MAP.gpt52,
|
||||
CODEX_MODEL_MAP.gpt51,
|
||||
CODEX_MODEL_MAP.gpt5,
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user