Skip to content

fix(tongyi): accept temperature below 0.6 for qwen3.8-max - #3767

Merged
crazywoola merged 3 commits into
langgenius:mainfrom
Souravrajvi0:fix/tongyi-qwen38-max-temperature-3746
Sep 3, 2026
Merged

crazywoola merged 3 commits into
langgenius:mainfrom
Souravrajvi0:fix/tongyi-qwen38-max-temperature-3746

Conversation

@Souravrajvi0

@Souravrajvi0 Souravrajvi0 commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #3746.

qwen3.8-max previously declared temperature.min: 0.6, so the Dify plugin SDK rejected values like temperature: 0 before the request reached DashScope. The official API accepts [0, 2) and normalizes values below 0.6 to 0.6 in thinking mode.

This PR:

  • Updates the model schema to allow the official [0, 2) input range (min: 0)
  • Normalizes temperature < 0.6 to 0.6 in the Tongyi LLM runtime when thinking mode is enabled
  • Leaves non-thinking invocations unchanged so low temperatures still pass through

Release Notes

  • Allow qwen3.8-max temperature values in the official [0, 2) range
  • In thinking mode, temperatures below 0.6 are normalized to 0.6 before calling DashScope

Test plan

  • uv run pytest tests/test_llm_qwen3_vl_hybrid_thinking.py -v
  • uv run pytest tests/ --ignore=tests/test_speech2text.py (126 passed)
  • Local verification script confirms:
    • temperature: 0 passes SDK validation
    • thinking mode normalizes to 0.6 before DashScope call
    • non-thinking mode preserves temperature: 0

Align qwen3.8-max with DashScope behavior from langgenius#3746: allow the official
[0, 2) input range in the model schema and normalize values below 0.6 to
0.6 when thinking mode is enabled instead of rejecting them locally.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 27, 2026
@crazywoola
crazywoola deployed to models/tongyi September 3, 2026 02:33 — with GitHub Actions Active
@crazywoola
crazywoola merged commit d5b9ec7 into langgenius:main Sep 3, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
models/tongyi — d3757d7f Deployed Sep 3, 2026 by crazywoola via test (models/tongyi) #2628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tongyi qwen3.8-max rejects temperature below 0.6 instead of following upstream normalization

2 participants