Interface: OpenAiNamespace
Defined in: openai/src/builders/openai-namespace-contract.ts:11
Builder namespace contract exported as openai by @paraharness/openai.
Provides entrypoints for declaring passive OpenAiAccountSeatNode and OpenAiModelNode AST descriptors without import-time or declaration-time side effects.
Methods
account()
account(id): OpenAiAccountSeatBuilder;Defined in: openai/src/builders/openai-namespace-contract.ts:23
Declares an OpenAI API key or Codex CLI account seat (type: 'openai:account-seat').
Supports .apiKey(envRef) for API key seats and .configDir(path) for Codex CLI subscription seats.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the OpenAI account seat. |
Returns
Fluent builder for the OpenAI account seat.
Throws
If id is an empty or whitespace-only string.
cliAccount()
cliAccount(id): OpenAiAccountSeatBuilder;Defined in: openai/src/builders/openai-namespace-contract.ts:36
Declares an OpenAI Codex CLI subscription seat (type: 'openai:account-seat').
Alias for account(id) supporting .configDir(path) and .apiKey(envRef).
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the OpenAI Codex CLI seat. |
Returns
Fluent builder for the OpenAI account seat.
Throws
If id is an empty or whitespace-only string.
model()
model(alias, options?): OpenAiModelBuilder;Defined in: openai/src/builders/openai-namespace-contract.ts:50
Declares an OpenAI Responses API model configuration (type: 'openai:model', vendor: 'openai').
Supports .accountPool(pool) / .pool(pool) and .effort(level) before compiling to OpenAiModelNode.
Parameters
| Parameter | Type | Description |
|---|---|---|
alias | string | Logical model alias (such as 'gpt5' or 'gpt-5'). |
options? | OpenAiModelOptions | Optional OpenAI model identifier (defaults to alias) and reasoning effort. |
Returns
Fluent builder for the OpenAI model node.
Throws
If alias or options.id is an empty or whitespace-only string.