Skip to content

fix: parse Ollama reasoning fields#3236

Merged
code-yeongyu merged 3 commits into
mainfrom
fix/ollama-qwen-reasoning-field
Jun 8, 2026
Merged

fix: parse Ollama reasoning fields#3236
code-yeongyu merged 3 commits into
mainfrom
fix/ollama-qwen-reasoning-field

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Summary

  • parse Ollama/Qwen reasoning fields in OpenAI-compatible non-streaming and streaming responses
  • add focused integration coverage for reasoning-before-text ordering
  • hint local Ollama OPENAI_BASE_URL for tagged Qwen model names and document local setup

Validation

  • cargo fmt --all --check
  • cargo test -p api ollama_reasoning -- --nocapture
  • cargo test -p api reasoning_content -- --nocapture
  • cargo test -p api openai_compatible_client_honors_http_proxy_for_requests -- --nocapture
  • cargo test -p api local_openai_gateway_strips_routing_prefix_and_preserves_extra_body_params -- --nocapture
  • cargo test -p rusty-claude-cli qwen_invalid_model_hint_mentions_local_ollama_openai_base_url -- --nocapture
  • cargo test -p rusty-claude-cli parses_single_word_command_aliases_without_falling_back_to_prompt_mode -- --nocapture
  • cargo test --workspace
  • cargo clippy --workspace --all-targets
  • Manual QA: OLLAMA_HOST=http://127.0.0.1:11434 ./rust/target/debug/claw --model gpt-oss:20b prompt "Reply exactly HELLO_WORLD_123" returned HELLO_WORLD_123

Notes

@code-yeongyu code-yeongyu merged commit 9b3548c into main Jun 8, 2026
6 checks passed
@code-yeongyu code-yeongyu deleted the fix/ollama-qwen-reasoning-field branch June 8, 2026 01:13
@1716775457damn
Copy link
Copy Markdown

This is a necessary companion to #3228. Parsing the Ollama reasoning field properly ensures Qwen3 thinking models produce usable output instead of empty responses. The CI is green and the fix is clean - good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants