Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions nodes/src/nodes/llm_openai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ model, and can also be wired directly via lanes: send a question in, receive a g
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.
Non-reasoning models are invoked through the Chat Completions API with `max_tokens` set to
the profile's output-token limit. `temperature` is configurable (default `0`, which is
generally more deterministic than higher values, though OpenAI does not guarantee identical
output for identical input); it is ignored for reasoning models, which OpenAI's Responses
API controls separately.

Reasoning-capable models (flagged via `capabilities.reasoning` in the model configuration)
are routed through the **OpenAI Responses API** instead, using `max_completion_tokens`.
Expand Down Expand Up @@ -48,10 +50,11 @@ errors are not, and are mapped to friendly messages (e.g. `Invalid API key.`).
| `model` | string | OpenAI model name. Only editable in the `custom` profile. |
| `modelTotalTokens` | number | Total token (context) limit. Only editable in the `custom` profile (default `16384`). Must be greater than 0. |
| `modelSource` | enum | Where the model is hosted (standard cloud-LLM field, default `provider`). |
| `temperature` | number | Sampling temperature for non-reasoning models, range `0`-`2` (default `0`). Available for every profile. Ignored by reasoning models. |

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.
Preconfigured profiles only expose `apikey`, `modelSource`, and `temperature`; 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.

---

Expand Down Expand Up @@ -132,6 +135,7 @@ Automated node tests are declared in `services.json`:
| `model` | `string` | **Model**<br/>OpenAI model | |
| `modelTotalTokens` | `number` | **Tokens**<br/>Total Tokens | |
| `openai.profile` | `string` | **Model**<br/>LLM model | `"openai-5-2"` |
| `temperature` | `number` | **Temperature**<br/>Sampling temperature for non-reasoning models: 0 is generally more deterministic, higher values increase variety. Ignored for reasoning models (o1, o3, GPT-5 reasoning variants, ...), which OpenAI's Responses API controls separately. | `0` |

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion nodes/src/nodes/llm_openai/openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, provider: str, connConfig: Dict[str, Any], bag: Dict[str, Any
self._llm = ChatOpenAI(
model=self._model,
api_key=apikey,
temperature=0,
temperature=config.get('temperature', 0),
max_tokens=self._modelOutputTokens,
)

Expand Down
10 changes: 9 additions & 1 deletion nodes/src/nodes/llm_openai/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,14 @@
"title": "Tokens",
"description": "Total Tokens"
},
"temperature": {
"type": "number",
"title": "Temperature",
"description": "Sampling temperature for non-reasoning models: 0 is generally more deterministic, higher values increase variety. Ignored for reasoning models (o1, o3, GPT-5 reasoning variants, ...), which OpenAI's Responses API controls separately.",
"default": 0,
"minimum": 0,
"maximum": 2
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"openai.custom": {
"object": "custom",
"properties": [
Expand Down Expand Up @@ -1237,7 +1245,7 @@
{
"section": "Pipe",
"title": "OpenAI",
"properties": ["openai.profile"]
"properties": ["openai.profile", "temperature"]
}
],
//
Expand Down
Loading