Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(model_runtime): ensure compatibility with O1 models by adjusting token parameters (#10537)
-LAN-867bf70f1a62
diff --git a/api/core/model_runtime/model_providers/openai/llm/llm.py b/api/core/model_runtime/model_providers/openai/llm/llm.pyindex 922e5e13141..68317d71796 100644--- a/api/core/model_runtime/model_providers/openai/llm/llm.py+++ b/api/core/model_runtime/model_providers/openai/llm/llm.py@@ -617,6 +617,10 @@ class OpenAILargeLanguageModel(_CommonOpenAI, LargeLanguageModel):# o1 compatibilityblock_as_stream = Falseif model.startswith("o1"):+ if "max_tokens" in model_parameters:+ model_parameters["max_completion_tokens"] = model_parameters["max_tokens"]+ del model_parameters["max_tokens"]+if stream:block_as_stream = Truestream = False