Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

provider-options.ts

29 lines1.2 KB

1/**
2 * Per-call provider options for the Codex adapter, passed via `modelOptions`
3 * on `chat()`.
4 */
5export interface CodexTextProviderOptions {
6 /**
7 * Resume an existing Codex thread. The adapter emits the thread id of
8 * every fresh run via a CUSTOM `codex.session-id` stream event; thread it
9 * back here to continue that session (only the latest user message is
10 * sent — the harness already holds the prior context).
11 */
12 sessionId?: string
13 /** Per-call override of the configured sandbox mode. */
14 sandboxMode?: 'read-only' | 'workspace-write' | 'danger-full-access'
15 /** Per-call override of the configured approval policy. */
16 approvalPolicy?: 'never' | 'on-failure' | 'on-request' | 'untrusted'
17 /** Per-call override of the model reasoning effort. */
18 modelReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high'
19 /** Per-call override of the harness working directory. */
20 workingDirectory?: string
21 /** Per-call override of the git-repo safety check (defaults to skipping). */
22 skipGitRepoCheck?: boolean
23 /**
24 * `'api-key'` (default) expects `CODEX_API_KEY`.
25 * `'host'` uses `codex login`.
26 * Not inferred from the sandbox.
27 */
28 authMode?: 'host' | 'api-key'