Skip to content

Commit 6917bce

Browse files
authored
[Partner Nodes] add Gpt 5.5 and 5.5-pro LLM models (#13673)
* feat(api-nodes): add Gpt 5.5 and 5.5-pro LLM models Signed-off-by: bigcat88 <bigcat88@icloud.com>
1 parent c55ff85 commit 6917bce

2 files changed

Lines changed: 22 additions & 10 deletions

File tree

comfy_api_nodes/apis/openai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ class ModelResponseProperties(BaseModel):
5656
instructions: str | None = Field(None)
5757
max_output_tokens: int | None = Field(None)
5858
model: str | None = Field(None)
59-
temperature: float | None = Field(1, description="Controls randomness in the response", ge=0.0, le=2.0)
59+
temperature: float | None = Field(None, description="Controls randomness in the response", ge=0.0, le=2.0)
6060
top_p: float | None = Field(
61-
1,
61+
None,
6262
description="Controls diversity of the response via nucleus sampling",
6363
ge=0.0,
6464
le=1.0,
6565
)
66-
truncation: str | None = Field("disabled", description="Allowed values: 'auto' or 'disabled'")
66+
truncation: str | None = Field(None, description="Allowed values: 'auto' or 'disabled'")
6767

6868

6969
class ResponseProperties(BaseModel):

comfy_api_nodes/nodes_openai.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,18 @@
3939

4040

4141
class SupportedOpenAIModel(str, Enum):
42-
o4_mini = "o4-mini"
43-
o1 = "o1"
44-
o3 = "o3"
45-
o1_pro = "o1-pro"
46-
gpt_4_1 = "gpt-4.1"
47-
gpt_4_1_mini = "gpt-4.1-mini"
48-
gpt_4_1_nano = "gpt-4.1-nano"
42+
gpt_5_5_pro = "gpt-5.5-pro"
43+
gpt_5_5 = "gpt-5.5"
4944
gpt_5 = "gpt-5"
5045
gpt_5_mini = "gpt-5-mini"
5146
gpt_5_nano = "gpt-5-nano"
47+
gpt_4_1 = "gpt-4.1"
48+
gpt_4_1_mini = "gpt-4.1-mini"
49+
gpt_4_1_nano = "gpt-4.1-nano"
50+
o4_mini = "o4-mini"
51+
o3 = "o3"
52+
o1_pro = "o1-pro"
53+
o1 = "o1"
5254

5355

5456
async def validate_and_cast_response(response, timeout: int = None) -> torch.Tensor:
@@ -739,6 +741,16 @@ def define_schema(cls):
739741
"usd": [0.002, 0.008],
740742
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
741743
}
744+
: $contains($m, "gpt-5.5-pro") ? {
745+
"type": "list_usd",
746+
"usd": [0.03, 0.18],
747+
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
748+
}
749+
: $contains($m, "gpt-5.5") ? {
750+
"type": "list_usd",
751+
"usd": [0.005, 0.03],
752+
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
753+
}
742754
: $contains($m, "gpt-5-nano") ? {
743755
"type": "list_usd",
744756
"usd": [0.00005, 0.0004],

0 commit comments

Comments
 (0)