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
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/fold-agent/src/Config/ConfigSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const RoleBinding = Schema.Struct({
model: Schema.optionalKey(
Schema.String.annotate({
description:
'Provider model id; defaults: codex/opencode → gpt-5.6-sol, xai → grok-4.5, anthropic → claude-opus-4-8; required for openai-compat',
'Provider model id; defaults: codex/opencode → gpt-5.6-sol, xai → grok-4.6, anthropic → claude-opus-4-8; required for openai-compat',
}),
),
/** Reasoning level for this role's requests. Defaults to `off` when omitted. */
Expand Down
2 changes: 1 addition & 1 deletion packages/fold-agent/src/Config/ConfigSchemaJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const starterConfigJsonc = (): string =>

// Model roles bound to a provider (+ optional model). "smart" and "fast" are required;
// "orchestrator" is optional and falls back to "smart". Omitting "model" uses the provider
// defaults: codex/opencode → gpt-5.6-sol, xai → grok-4.5, anthropic → claude-opus-4-8.
// defaults: codex/opencode → gpt-5.6-sol, xai → grok-4.6, anthropic → claude-opus-4-8.
"roles": {
// Default primary model for new sessions.
"smart": { "provider": "codex", "model": "gpt-5.6-sol", "reasoning": "medium" },
Expand Down
2 changes: 1 addition & 1 deletion packages/fold-agent/src/Config/FoldInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ is optional and falls back to \`smart\`.
| \`orchestrator\` | the RLM mode's primary agent |

Each binding is \`{ "provider": <key>, "model"?: <id>, "reasoning"?: <level> }\`. Omitting \`model\`
uses the provider kind's default: codex/opencode → \`gpt-5.6-sol\`, xai → \`grok-4.5\`, and
uses the provider kind's default: codex/opencode → \`gpt-5.6-sol\`, xai → \`grok-4.6\`, and
anthropic → \`claude-opus-4-8\`
(openai-compat requires an explicit model). \`reasoning\` is one of \`off · minimal · low · medium ·
high · xhigh · max\` and is validated against the model catalog - a level the model does not support
Expand Down
2 changes: 1 addition & 1 deletion packages/fold-agent/test/Config/AgentModels.vi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ it.effect('resolves OpenCode and xAI OAuth providers with their defaults and no
const openCode = yield* models.resolve('smart')
const xai = yield* models.resolve('fast')
expect(openCode.activeModel).toMatchObject({ providerId: 'zen', modelId: 'gpt-5.6-sol', role: 'smart' })
expect(xai.activeModel).toMatchObject({ providerId: 'grok', modelId: 'grok-4.5', role: 'fast' })
expect(xai.activeModel).toMatchObject({ providerId: 'grok', modelId: 'grok-4.6', role: 'fast' })
}),
)

Expand Down
6 changes: 3 additions & 3 deletions packages/fold-agent/test/Config/ModelSelections.vi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ it.effect('provides OAuth defaults when the external catalog is unavailable', ()
})
expect(description.providers.find(({ name }) => name === 'grok')).toMatchObject({
credentialPresent: null,
models: ['grok-4.5'],
models: ['grok-4.6'],
})
}),
)

it.effect('only exposes Grok 4.5 for xAI providers', () =>
it.effect('only exposes Grok 4.6 for xAI providers', () =>
Effect.gen(function* () {
const config = yield* parseFoldConfig(`{
"providers": { "grok": { "kind": "xai", "configuredModels": ["grok-3", "grok-4"] } },
Expand All @@ -228,6 +228,6 @@ it.effect('only exposes Grok 4.5 for xAI providers', () =>
}
}`)
const description = describeModelConfiguration(config, [catalogEntry('xai', 'grok-2')])
expect(description.providers[0]?.models).toEqual(['grok-4.5'])
expect(description.providers[0]?.models).toEqual(['grok-4.6'])
}),
)
2 changes: 1 addition & 1 deletion packages/fold-cli/src/tui/ProviderConfigState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const emptyProviderForm = (): ProviderForm => ({
const defaults = (kind: ProviderForm['kind']): Pick<ProviderForm, 'baseUrl' | 'model'> => {
if (kind === 'codex') return { baseUrl: 'https://chatgpt.com/backend-api/codex', model: 'gpt-5.6-sol' }
if (kind === 'opencode') return { baseUrl: 'https://opencode.ai/zen/v1', model: 'gpt-5.6-sol' }
if (kind === 'xai') return { baseUrl: 'https://api.x.ai/v1', model: 'grok-4.5' }
if (kind === 'xai') return { baseUrl: 'https://api.x.ai/v1', model: 'grok-4.6' }
if (kind === 'anthropic') return { baseUrl: 'https://api.anthropic.com', model: '' }
return { baseUrl: 'https://api.openai.com/v1', model: '' }
}
Expand Down
2 changes: 1 addition & 1 deletion packages/fold-cli/test/tui/ProviderConfigState.vi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('provider config form state', () => {
const rows = providerManagementRows({ profiles: [], providers: [] })
expect(rows[3]).toMatchObject({
type: 'create',
form: { name: 'xai', kind: 'xai', baseUrl: 'https://api.x.ai/v1', model: 'grok-4.5' },
form: { name: 'xai', kind: 'xai', baseUrl: 'https://api.x.ai/v1', model: 'grok-4.6' },
})
expect(rows[4]).toMatchObject({
type: 'create',
Expand Down
4 changes: 2 additions & 2 deletions packages/fold-xai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"@humanlayer/fold-core": "workspace:*"
},
"peerDependencies": {
"@effect/ai-openai": "catalog:",
"@effect/ai-openai-compat": "catalog:",
"@effect/platform-node": "catalog:",
"effect": "catalog:"
},
"devDependencies": {
"@effect/ai-openai": "catalog:",
"@effect/ai-openai-compat": "catalog:",
"@effect/platform-node": "catalog:",
"@effect/vitest": "catalog:",
"@humanlayer/fold-vitest-config": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/fold-xai/src/XaiModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** FoldModel factory for xAI's OpenAI-compatible inference API authenticated with OAuth. */
import { OpenAiClient, OpenAiLanguageModel } from '@effect/ai-openai'
import { OpenAiClient, OpenAiLanguageModel } from '@effect/ai-openai-compat'
import { customModel, resolveOpenAiReasoning } from '@humanlayer/fold-core'
import type { FoldModel, ReasoningLevel } from '@humanlayer/fold-core'
import { Context, Effect, Layer } from 'effect'
Expand All @@ -11,7 +11,7 @@ import type { XaiAuthStore } from './AuthStore'
import { makeXaiAuth, withXaiAuth } from './XaiAuth'

export const XAI_API_URL = 'https://api.x.ai/v1'
export const DEFAULT_XAI_MODEL_ID = 'grok-4.5'
export const DEFAULT_XAI_MODEL_ID = 'grok-4.6'

export type XaiModelOptions = {
readonly model?: string
Expand Down
Loading