Repository navigation
feat(go): Add Z.ai model entries to all_models.json Add missing Qwen commercial models and provider aliases - #15929
Conversation
📝 WalkthroughWalkthroughThe PR updates ChangesModels Configuration Update
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@conf/all_models.json`:
- Around line 12-17: The conf contains unsupported keys ("dimensions",
"max_chars", "max_documents") that are dropped when unmarshalling into the Model
struct in internal/entity/models/model.go; either remove these keys from
conf/all_models.json or extend the Model schema and its consumers to include
fields for Dimensions, MaxChars, and MaxDocuments and wire them into
embedding/rerank logic (update any functions that rely on model dimensions or
token/char limits). Also add validation after unmarshalling to detect
unknown/unused keys (or assert parsed values) so configuration/contract
mismatches fail loudly rather than being silently ignored.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 89a1ea2e-87cb-4f36-8800-e19e01464a41
📒 Files selected for processing (1)
conf/all_models.json
| "dimensions": [ | ||
| 256, | ||
| 512, | ||
| 1024, | ||
| 2048 | ||
| ], |
There was a problem hiding this comment.
Unsupported metadata keys are silently ignored by the Go model loader.
Line 12 (dimensions) and Lines 41-42 (max_chars, max_documents) are not part of the parsed Model struct used by internal/entity/models/model.go, so these values are dropped at unmarshal time. That creates a config/runtime contract gap for embedding/rerank behavior.
Please either (a) extend the Go model schema + consumers to support these keys, or (b) remove these keys from this catalog to avoid misleading configuration.
As per coding guidelines, cross-file and configuration contract breaks should be validated against actual parsed values, not just key presence.
Also applies to: 41-42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@conf/all_models.json` around lines 12 - 17, The conf contains unsupported
keys ("dimensions", "max_chars", "max_documents") that are dropped when
unmarshalling into the Model struct in internal/entity/models/model.go; either
remove these keys from conf/all_models.json or extend the Model schema and its
consumers to include fields for Dimensions, MaxChars, and MaxDocuments and wire
them into embedding/rerank logic (update any functions that rely on model
dimensions or token/char limits). Also add validation after unmarshalling to
detect unknown/unused keys (or assert parsed values) so configuration/contract
mismatches fail loudly rather than being silently ignored.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15929 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
conf/all_models.json.qwen/...aliasesqwen.qwen3-*model IDsthinkingmetadata for Qwen models that officially support thinking mode.name.