Skip to content

fix(vlm): scope LiteLLM thinking param to DashScope providers only#958

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
deepakdevp:fix/litellm-dashscope-thinking
Mar 26, 2026
Merged

fix(vlm): scope LiteLLM thinking param to DashScope providers only#958
qin-ctx merged 1 commit intovolcengine:mainfrom
deepakdevp:fix/litellm-dashscope-thinking

Conversation

@deepakdevp
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #939 (which fixed OpenAI backends). This PR narrows the LiteLLM thinking parameter to DashScope providers only:

  • _build_kwargs() now detects the provider via self._detected_provider or detect_provider_by_model(model) and only sets extra_body["enable_thinking"] when provider is "dashscope"
  • Non-DashScope providers (OpenAI, Azure, Ollama, Anthropic) never receive this vendor-specific field
  • 7 tests: positive (DashScope enabled/disabled), negative (GPT-4o, Claude, Ollama, model-name detection)

Addresses feedback from closed PR #949. Fixes #923.

Test plan

  • 7 tests pass (pytest tests/unit/test_vlm_thinking_param.py)
  • DashScope model gets enable_thinking in extra_body
  • Non-DashScope models do NOT get enable_thinking
  • Ruff clean

Follow-up to volcengine#939 (which fixed OpenAI backends). The LiteLLM backend
now sends enable_thinking via extra_body only when the detected
provider is DashScope. Non-DashScope providers (OpenAI, Azure, Ollama)
never receive this vendor-specific field.

Fixes volcengine#923.
@github-actions
Copy link
Copy Markdown

Failed to generate code suggestions for PR

@qin-ctx qin-ctx merged commit 54c36c8 into volcengine:main Mar 26, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: VLM backend thinking parameter defined but never passed to API (causes auto-capture timeout with thinking-enabled models)

2 participants