Skip to content

Function: createOpenAiModelBuilder() ​

ts
function createOpenAiModelBuilder(
   alias, 
   options?, 
   accountPool?
): OpenAiModelBuilder;

Defined in: openai/src/builders/create-openai-model-builder.ts:25

Creates an immutable OpenAiModelBuilder for an OpenAI Responses API model configuration.

Validates that both alias and the resolved modelId (options?.id ?? alias) are non-empty strings and compiles to a frozen passive OpenAiModelNode without performing network or environment I/O.

Parameters ​

ParameterTypeDescription
aliasstringLogical alias of the model.
options?OpenAiModelOptionsOptional provider model identifier and effort level.
accountPool?PoolNode<OpenAiAccountSeatNode>Optional compiled pool of OpenAI account seats.

Returns ​

OpenAiModelBuilder

Immutable builder compiling to OpenAiModelNode.

Throws ​

If alias or options.id is an empty or whitespace-only string.

Released under the MIT License.