fix(wren-ai-service): respect user response_format override in intent_classification pipeline#2123
Conversation
…_classification pipeline Co-authored-by: Cursor <cursoragent@cursor.com>
WalkthroughThe intent classification generator now supports user-configurable model kwargs. A default configuration is defined, and any provider-supplied kwargs are overlaid on top, with special handling for response_format conflicts. The generation process now uses these computed kwargs instead of the static default constant. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR fixes an issue where the intent_classification pipeline always injects
OpenAI-only structured output defaults (
json_schema), even when usersoverride
response_formatin config.Details
Qwen-compatible API servers do not support OpenAI structured output and
disconnect when receiving unsupported parameters. The current merge logic
overwrites user-provided kwargs, making it impossible to disable structured
output.
This change ensures user configuration fully overrides defaults, allowing
non-OpenAI providers to function correctly.
Impact
Closes #2113
Summary by CodeRabbit
Release Notes