Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(vlm): omit unset OpenAI max_tokens (#2946)
Qin Haojieb90c6626cbc4
diff --git a/openviking/models/vlm/backends/openai_vlm.py b/openviking/models/vlm/backends/openai_vlm.pyindex 012adcbf3..e90d64092 100644--- a/openviking/models/vlm/backends/openai_vlm.py+++ b/openviking/models/vlm/backends/openai_vlm.py@@ -233,8 +233,8 @@ class OpenAIVLM(VLMBase):else:kwargs["temperature"] = self.temperatureself._apply_provider_specific_extra_body(kwargs, effective_thinking)- max_tokens = self.max_tokens or 32768- kwargs["max_completion_tokens" if is_reasoning else "max_tokens"] = max_tokens+ if self.max_tokens is not None:+ kwargs["max_completion_tokens" if is_reasoning else "max_tokens"] = self.max_tokensif tools:kwargs["tools"] = toolskwargs["tool_choice"] = tool_choice or "auto"@@ -271,8 +271,8 @@ class OpenAIVLM(VLMBase):else:kwargs["temperature"] = self.temperatureself._apply_provider_specific_extra_body(kwargs, effective_thinking)- max_tokens = self.max_tokens or 32768- kwargs["max_completion_tokens" if is_reasoning else "max_tokens"] = max_tokens+ if self.max_tokens is not None:+ kwargs["max_completion_tokens" if is_reasoning else "max_tokens"] = self.max_tokensif tools:kwargs["tools"] = toolskwargs["tool_choice"] = tool_choice or "auto"