Skip to main content
View source

OpenAI

View as Markdown

A RocketRide LLM node that connects OpenAI GPT models to a pipeline.

What it does

Provides an OpenAI-backed chat LLM (classType: llm, capability invoke). It is used primarily as an llm invoke connection by agents and other nodes that need a language model, and can also be wired directly via lanes: send a question in, receive a generated answer out.

Built on langchain-openai (ChatOpenAI) with the openai SDK underneath. Non-reasoning models are invoked through the Chat Completions API with temperature: 0 and max_tokens set to the profile's output-token limit, so responses are deterministic by default.

Reasoning-capable models (flagged via capabilities.reasoning in the model configuration) are routed through the OpenAI Responses API instead, using max_completion_tokens. This lets the node stream the model's reasoning summary over the thinking SSE lane in addition to the answer (SUPPORTS_REASONING_STREAMING is on).

When a pipeline is validated, the node makes a tiny live test call to the configured model (a one-word prompt capped at a few tokens) to verify the API key and model name up front. Models whose names start with gpt-5 (including gpt-5.1, gpt-5-mini, gpt-5-nano, and later families) are probed with max_completion_tokens; older ones with max_tokens. Validation failures surface as warnings with the provider's status code, error type, and message.

Rate-limit and connection errors are treated as retryable; authentication and other API errors are not, and are mapped to friendly messages (e.g. Invalid API key.).


Configuration

Lanes

Lane inLane outDescription
questionsanswersSend a question directly, receive a generated answer

Fields

FieldTypeDescription
profileenumModel selection. Default openai-5-2 (GPT-5.2). See profiles below.
apikeystringOpenAI API key. Required for every profile.
modelstringOpenAI model name. Only editable in the custom profile.
modelTotalTokensnumberTotal token (context) limit. Only editable in the custom profile (default 16384). Must be greater than 0.
modelSourceenumWhere the model is hosted (standard cloud-LLM field, default provider).

Preconfigured profiles only expose apikey and modelSource; the model name and token limits come from the profile. The custom profile additionally exposes model and modelTotalTokens for any OpenAI model not in the list.


Profiles

Default profile: openai-5-2 (GPT-5.2).

ProfileModelContext tokensOutput tokens
openai-5-4gpt-5.41,050,000128,000
openai-5-4-progpt-5.4-pro1,050,000128,000
openai-5-4-minigpt-5.4-mini400,000128,000
openai-5-4-nanogpt-5.4-nano400,000128,000
gpt-5-5gpt-5.51,050,000128,000
openai-5-2 (default)gpt-5.2400,000128,000
openai-5-1gpt-5.1400,000128,000
openai-5gpt-5400,000128,000
openai-5-minigpt-5-mini400,000128,000
openai-5-nanogpt-5-nano400,000128,000
gpt-5-3-chat-latestgpt-5.3-chat-latest16,38416,384
gpt-5-2-chat-latestgpt-5.2-chat-latest16,38416,384
gpt-5-1-chat-latestgpt-5.1-chat-latest16,38416,384
gpt-5-chat-latestgpt-5-chat-latest16,38416,384
openai-4ogpt-4o128,00016,384
openai-4o-minigpt-4o-mini128,00016,384
gpt-4-1gpt-4.11,047,57632,768
gpt-4-1-minigpt-4.1-mini1,047,57632,768
gpt-4-1-nanogpt-4.1-nano1,047,57632,768
gpt-4-turbogpt-4-turbo128,0004,096
gpt-4gpt-48,1914,096
gpt-3-5-turbogpt-3.5-turbo16,3854,096
gpt-3-5-turbo-16kgpt-3.5-turbo-16k16,3854,096
o1o1200,000100,000
o3o3200,000100,000
o3-minio3-mini200,000100,000
o4-minio4-mini200,000100,000
custom(user-specified)configurable (default 16,384)n/a

Reasoning streaming

For models whose configuration carries capabilities.reasoning, the node builds a raw openai client alongside the LangChain one and streams answers via the Responses API with reasoning: {summary: 'auto'}. Reasoning-summary deltas are forwarded over the thinking SSE lane while the answer streams normally. Non-reasoning models use plain LangChain streaming and are unaffected.


Authentication

Set apikey to an OpenAI API key for every profile (including custom). The key is verified with a live one-word test call during pipeline validation, so a bad key or model name is reported before the pipeline runs rather than at first invoke.


Testing

Automated node tests are declared in services.json:

  • Mock group: runs the openai-5-2, openai-5-4, openai-5-4-pro, openai-5-4-mini, and openai-5-4-nano profiles against a mocked langchain_openai; no real API key needed. ROCKETRIDE_MOCK must point to nodes/test/mocks.
  • Real group: skipped unless ROCKETRIDE_OPENAI_KEY is set; calls the live API with the openai-4o-mini profile.

Schema

FieldTypeDescriptionDefault
modelstringModel
OpenAI model
modelTotalTokensnumberTokens
Total Tokens
openai.profilestringModel
LLM model
"openai-5-2"

Dependencies

  • openai
  • langchain-openai
  • langchain-core
  • langchain