openai(modelId, config?) from @agentium/core. For a native speech session, see OpenAI voice adapters.
Setup
Factory
openai-agent.ts and run with npx tsx openai-agent.ts. Model calls require account access and incur provider usage.
Supported models
The examples usegpt-6.1-sol for general work and gpt-6-luna for focused tasks. gpt-6-astra is the heavier reasoning/coding option. These choices were checked on October 4, 2026; see Example models and the OpenAI catalog.
Agentium accepts a model ID string; acceptance by the constructor does not prove that the provider supports it or that your account has access.
Config
apiKey overrides OPENAI_API_KEY; baseURL points the SDK to an explicitly configured endpoint. A compatible gateway must support the API shape selected for that model, including Responses for GPT-6 tools.
Per-request API key override
The model execution configuration supports anapiKey override. Resolve per-user credentials through authenticated host configuration before passing them to execution. Do not expose unrestricted credential/endpoint selection through an unauthenticated route.
Reasoning
temperature, topP, and stop fields for reasoning families. Select an effort supported by the model; the type’s full union is not a guarantee that every model accepts every value. See reasoning.