feat(api-nodes): add Gpt 5.5 and 5.5-pro LLM models

This commit is contained in:
bigcat88 2026-05-02 15:47:41 +03:00
parent 3e3ed8cc2a
commit 013a5446a8
2 changed files with 15 additions and 3 deletions

View File

@ -56,14 +56,14 @@ class ModelResponseProperties(BaseModel):
instructions: str | None = Field(None) instructions: str | None = Field(None)
max_output_tokens: int | None = Field(None) max_output_tokens: int | None = Field(None)
model: str | None = Field(None) model: str | None = Field(None)
temperature: float | None = Field(1, description="Controls randomness in the response", ge=0.0, le=2.0) temperature: float | None = Field(None, description="Controls randomness in the response", ge=0.0, le=2.0)
top_p: float | None = Field( top_p: float | None = Field(
1, None,
description="Controls diversity of the response via nucleus sampling", description="Controls diversity of the response via nucleus sampling",
ge=0.0, ge=0.0,
le=1.0, le=1.0,
) )
truncation: str | None = Field("disabled", description="Allowed values: 'auto' or 'disabled'") truncation: str | None = Field(None, description="Allowed values: 'auto' or 'disabled'")
class ResponseProperties(BaseModel): class ResponseProperties(BaseModel):

View File

@ -49,6 +49,8 @@ class SupportedOpenAIModel(str, Enum):
gpt_5 = "gpt-5" gpt_5 = "gpt-5"
gpt_5_mini = "gpt-5-mini" gpt_5_mini = "gpt-5-mini"
gpt_5_nano = "gpt-5-nano" gpt_5_nano = "gpt-5-nano"
gpt_5_5 = "gpt-5.5"
gpt_5_5_pro = "gpt-5.5-pro"
async def validate_and_cast_response(response, timeout: int = None) -> torch.Tensor: async def validate_and_cast_response(response, timeout: int = None) -> torch.Tensor:
@ -739,6 +741,16 @@ class OpenAIChatNode(IO.ComfyNode):
"usd": [0.002, 0.008], "usd": [0.002, 0.008],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" } "format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
} }
: $contains($m, "gpt-5.5-pro") ? {
"type": "list_usd",
"usd": [0.03, 0.18],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
: $contains($m, "gpt-5.5") ? {
"type": "list_usd",
"usd": [0.005, 0.03],
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
}
: $contains($m, "gpt-5-nano") ? { : $contains($m, "gpt-5-nano") ? {
"type": "list_usd", "type": "list_usd",
"usd": [0.00005, 0.0004], "usd": [0.00005, 0.0004],