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/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function assertThinkingValue(args: { provider: ProviderType; modelId: string; th
}
}

if (args.provider === 'codex' && (modelId.includes('gpt-6-') || modelId.includes('gpt-5.6'))) {
if (args.provider === 'codex' && (modelId.includes('gpt-6') || 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 @@ -378,7 +378,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-6-astra',
codex: 'gpt-6.1-sol',
copilot: 'gpt-5.4',
firepass: FIREWORKS_MODEL_ID,
}
Expand Down
8 changes: 4 additions & 4 deletions agents/codelayer/test/agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ 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-6.1 Sol as the default codex model', () => {
expect(DEFAULT_MODELS.codex).toBe('gpt-6.1-sol')
})

test('uses gpt-5.4 as the default copilot model', () => {
Expand Down Expand Up @@ -525,7 +525,7 @@ describe('createCodelayerAgent', () => {
expect(buildProviderOptions(model, overrides).openai.reasoningEffort).toBe('max')
})

test.each(['gpt-6-sol', 'gpt-6-luna'])('%s accepts every exposed CLI effort', (modelId) => {
test.each(['gpt-6.1-sol', 'gpt-6-sol', 'gpt-6-luna'])('%s accepts every exposed CLI effort', (modelId) => {
const model = createMockModel(modelId)

for (const thinking of ['low', 'medium', 'high', 'xhigh', 'max']) {
Expand Down Expand Up @@ -1181,7 +1181,7 @@ describe('subagentThinkingOverrides', () => {
}
})

test.each(['gpt-6-sol', 'gpt-6-luna'])('%s preserves the root, child, research, and outline matrix', async (modelId) => {
test.each(['gpt-6.1-sol', 'gpt-6-sol', 'gpt-6-luna'])('%s preserves the root, child, research, and outline matrix', async (modelId) => {
const rootModel = createMockModel(modelId, 'codex')
const researchModel = createMockModel('gpt-5.6-terra', 'codex')
const agent = await createCodelayerAgent({
Expand Down
66 changes: 66 additions & 0 deletions packages/agentlayer-core/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -54912,6 +54912,72 @@
"name": "OpenAI",
"doc": "https://platform.openai.com/docs/models",
"models": {
"gpt-6.1-sol": {
"id": "gpt-6.1-sol",
"name": "GPT-6.1 Sol",
"description": "OpenAI model with near-Astra performance for complex coding and professional work",
"family": "gpt-sol",
"attachment": true,
"reasoning": true,
"reasoning_options": [
{
"type": "effort",
"values": [
"low",
"medium",
"high",
"xhigh",
"max"
]
}
],
"tool_call": true,
"structured_output": true,
"temperature": false,
"knowledge": "2026-04-30",
"release_date": "2026-09-29",
"last_updated": "2026-09-29",
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
},
"open_weights": false,
"limit": {
"context": 1050000,
"input": 922000,
"output": 128000
},
"cost": {
"input": 2,
"output": 10,
"cache_read": 0.1,
"cache_write": 2.5,
"tiers": [
{
"input": 4,
"output": 15,
"cache_read": 0.2,
"cache_write": 5,
"tier": {
"type": "context",
"size": 272000
}
}
],
"context_over_200k": {
"input": 4,
"output": 15,
"cache_read": 0.2,
"cache_write": 5
}
}
},
"gpt-6-sol": {
"id": "gpt-6-sol",
"name": "GPT-6 Sol",
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,10 +37,11 @@ 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 and GPT-6 Astra/Sol/Luna use 272,000 raw tokens; gpt-5.6 uses 372,000.
* gpt-5.4/5.5, GPT-6 Astra/Sol/Luna, and GPT-6.1 Sol use 272,000 raw tokens; gpt-5.6 uses 372,000.
*/
export const CODEX_CONTEXT_WINDOWS = {
'gpt-6-astra': 258_400,
'gpt-6.1-sol': 258_400,
'gpt-6-sol': 258_400,
'gpt-6-luna': 258_400,
'gpt-5.6-sol': 353_400,
Expand Down
2 changes: 1 addition & 1 deletion packages/agentlayer-core/test/compaction-engine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('compaction policy', () => {
expect(compactionUsableTokens({ contextWindow: 1 })).toBe(1)
})

test.each(['gpt-6-sol', 'gpt-6-luna'])('%s reserves output and summary headroom', (modelId) => {
test.each(['gpt-6.1-sol', 'gpt-6-sol', 'gpt-6-luna'])('%s reserves output and summary headroom', (modelId) => {
const contextWindow = getCodexContextWindow(modelId)

expect(contextWindow).toBe(258_400)
Expand Down
11 changes: 10 additions & 1 deletion packages/agentlayer-core/test/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('ModelProvider.getModelLimits', () => {
expect(limits?.output).toBe(128_000)
})

test.each(['gpt-6-sol', 'gpt-6-luna'] as const)(
test.each(['gpt-6.1-sol', 'gpt-6-sol', 'gpt-6-luna'] as const)(
'codex/%s uses the effective Codex window while retaining public output metadata',
(modelId) => {
const limits = provider.getModelLimits(`codex/${modelId}`)
Expand Down Expand Up @@ -95,6 +95,15 @@ describe('ModelProvider.getModelLimits', () => {
expect(provider.getModelPricing(`openai/${modelId}`)).toMatchObject({ input, output })
})

test('gpt-6.1-sol keeps its public OpenAI limits and pricing', () => {
expect(provider.getModelLimits('openai/gpt-6.1-sol')).toMatchObject({
context: 1_050_000,
input: 922_000,
output: 128_000,
})
expect(provider.getModelPricing('openai/gpt-6.1-sol')).toMatchObject({ input: 2, output: 10, cacheRead: 0.1 })
})

test('claude-opus-5-5 exposes public Anthropic limits and pricing', () => {
expect(provider.getModelLimits('anthropic/claude-opus-5-5')).toMatchObject({
context: 1_000_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ function makeOptions(overrides?: Partial<LanguageModelV3CallOptions>): LanguageM
}

describe('model-specific max reasoning', () => {
const maxReasoningModels = ['gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna', 'gpt-6-sol', 'gpt-6-luna']
const maxReasoningModels = [
'gpt-5.6-sol',
'gpt-5.6-terra',
'gpt-5.6-luna',
'gpt-6-sol',
'gpt-6-luna',
'gpt-6.1-sol',
]

test.each(maxReasoningModels)('%s accepts max effort', (modelId) => {
expect(isReasoningEffortForModel(modelId, 'max')).toBe(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,14 @@ const lowerOptions = Effect.fn('OpenAIResponses.lowerOptions')(function* (reques
}
})

const MAX_REASONING_MODELS = new Set(['gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna', 'gpt-6-sol', 'gpt-6-luna'])
const MAX_REASONING_MODELS = new Set([
'gpt-5.6-sol',
'gpt-5.6-terra',
'gpt-5.6-luna',
'gpt-6-sol',
'gpt-6-luna',
'gpt-6.1-sol',
])

export const isReasoningEffortForModel = (modelId: string, effort: ReasoningEffort): boolean =>
OpenAIOptions.isReasoningEffort(effort) || (effort === 'max' && MAX_REASONING_MODELS.has(modelId))
Expand Down
Loading