Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/codelayer/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function resolveCodexThinking(model: LanguageModel): Record<string, unknown> {
if (modelId.includes('gpt-5.5')) {
return { reasoningSummary: 'detailed', reasoningEffort: 'medium' }
}
if (modelId.includes('gpt-5') && !modelId.includes('gpt-5-pro')) {
if ((modelId.includes('gpt-5') || modelId.includes('gpt-6')) && !modelId.includes('-pro')) {
return { reasoningSummary: 'detailed', reasoningEffort: 'medium' }
}
return {}
Expand Down
4 changes: 2 additions & 2 deletions agents/codelayer/src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ function assertThinkingValue(args: { provider: ProviderType; modelId: string; th
}
}

if (args.provider === 'codex' && modelId.includes('gpt-5.6')) {
// GPT-5.6 also advertises ultra, but it assumes Codex CLI spawn-agent tools we do not expose yet.
if (args.provider === 'codex' && (modelId.includes('gpt-6-astra') || modelId.includes('gpt-5.6'))) {
// These models also advertise ultra, but it assumes Codex CLI spawn-agent tools we do not expose yet.
supported(['low', 'medium', 'high', 'xhigh', 'max'])
return
}
Expand Down
2 changes: 1 addition & 1 deletion agents/codelayer/src/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const FIREWORKS_MODEL_ID = 'accounts/fireworks/routers/kimi-k2p6-turbo'
export const DEFAULT_MODELS: Record<ProviderType, string> = {
anthropic: 'claude-opus-4-5',
openai: 'gpt-5.5',
codex: 'gpt-5.6-sol',
codex: 'gpt-6-astra',
copilot: 'gpt-5.4',
firepass: FIREWORKS_MODEL_ID,
}
Expand Down
19 changes: 19 additions & 0 deletions agents/codelayer/test/agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ describe('provider resolution', () => {
})

describe('createCodelayerAgent', () => {
test('uses GPT-6 Astra as the default codex model', () => {
expect(DEFAULT_MODELS.codex).toBe('gpt-6-astra')
})

test('uses gpt-5.4 as the default copilot model', () => {
expect(DEFAULT_MODELS.copilot).toBe('gpt-5.4')
})
Expand Down Expand Up @@ -505,6 +509,21 @@ describe('createCodelayerAgent', () => {
expect(buildProviderOptions(model, overrides).openai.reasoningEffort).toBe('xhigh')
})

test('applies default reasoning and accepts max thinking for GPT-6 Astra', () => {
const model = createMockModel('gpt-6-astra')
const overrides = applyCliThinkingOverride({
provider: 'codex',
modelId: 'gpt-6-astra',
thinking: 'max',
overrides: {},
})

expect(buildProviderOptions(model)).toMatchObject({
openai: { reasoningSummary: 'detailed', reasoningEffort: 'medium' },
})
expect(buildProviderOptions(model, overrides).openai.reasoningEffort).toBe('max')
})

test('applies explicit CLI thinking for firepass kimi models', () => {
const model = createMockModel(DEFAULT_MODELS.firepass)
const overrides = applyCliThinkingOverride({
Expand Down
91 changes: 91 additions & 0 deletions packages/agentlayer-core/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -57373,6 +57373,97 @@
"cache_read": 1
}
}
},
"gpt-6-astra": {
"id": "gpt-6-astra",
"name": "GPT-6 Astra",
"description": "GPT-6 Astra is OpenAI's most capable model for complex reasoning, coding, computer use, research, and document creation.",
"family": "gpt-astra",
"attachment": true,
"reasoning": true,
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"tool_call": true,
"structured_output": true,
"temperature": false,
"release_date": "2026-09-04",
"last_updated": "2026-09-04",
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"open_weights": false,
"limit": {
"context": 1050000,
"input": 922000,
"output": 128000
},
"experimental": {
"modes": {
"fast": {
"cost": {
"input": 20,
"output": 100,
"cache_read": 2,
"cache_write": 25
},
"provider": {
"body": {
"service_tier": "priority"
}
}
},
"pro": {
"provider": {
"body": {
"reasoning": {
"mode": "pro"
}
}
}
}
}
},
"cost": {
"input": 10,
"output": 50,
"cache_read": 1,
"cache_write": 12.5,
"tiers": [
{
"input": 20,
"output": 75,
"cache_read": 2,
"cache_write": 25,
"tier": {
"type": "context",
"size": 272000
}
}
],
"context_over_200k": {
"input": 20,
"output": 75,
"cache_read": 2,
"cache_write": 25
}
}
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/agentlayer-core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export type ModelKey = `${string}/${string}`
* Effective Codex context window, per model.
*
* Codex reserves 5% of the raw backend window for system prompt, tool overhead, and output:
* gpt-5.4/5.5 use 272,000 raw tokens; gpt-5.6 uses 372,000 raw tokens.
* gpt-5.4/5.5 and GPT-6 Astra use 272,000 raw tokens; gpt-5.6 uses 372,000.
*/
export const CODEX_CONTEXT_WINDOWS = {
'gpt-6-astra': 258_400,
'gpt-5.6-sol': 353_400,
'gpt-5.6-terra': 353_400,
'gpt-5.6-luna': 353_400,
Expand Down
17 changes: 16 additions & 1 deletion packages/agentlayer-core/test/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('ModelProvider.getModelLimits', () => {
['codex.responses/gpt-5.6-terra', 'gpt-5.6-terra'],
['codex-sse-vendor/gpt-5.6-luna', 'gpt-5.6-luna'],
] satisfies [ModelKey, keyof typeof CODEX_CONTEXT_WINDOWS][])(
'%s resolves to the GPT-5.6 Codex window',
'%s resolves to the expanded Codex window',
(modelKey, modelId) => {
const limits = provider.getModelLimits(modelKey)

Expand All @@ -28,6 +28,13 @@ describe('ModelProvider.getModelLimits', () => {
},
)

test('codex/gpt-6-astra uses the Codex app window instead of the public API window', () => {
const limits = provider.getModelLimits('codex/gpt-6-astra')

expect(limits?.context).toBe(258_400)
expect(limits?.output).toBe(128_000)
})

test('openai/gpt-5.5 keeps the public OpenAI API context window', () => {
const limits = provider.getModelLimits('openai/gpt-5.5')

Expand All @@ -44,4 +51,12 @@ describe('ModelProvider.getModelLimits', () => {
expect(provider.getModelPricing('openai/gpt-5.6-terra')).toMatchObject({ input: 2.5, output: 15 })
expect(provider.getModelPricing('openai/gpt-5.6-luna')).toMatchObject({ input: 1, output: 6 })
})

test('openai/gpt-6-astra keeps the public OpenAI API context window and pricing', () => {
const limits = provider.getModelLimits('openai/gpt-6-astra')

expect(limits?.context).toBe(1_050_000)
expect(limits?.output).toBe(128_000)
expect(provider.getModelPricing('openai/gpt-6-astra')).toMatchObject({ input: 10, output: 50 })
})
})
Loading