Repository navigation
feat: update all_models.json to content_length + max_output - #17839
Conversation
Replace max_tokens with content_length + max_output (2178 entries). Fix deepseek v4 max_output: 1048576 → 393216 (official spec: 384K). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded ChangesModel configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Sync max_output values to match verified provider configs from model-config-content-length branch. Fixes 311 field mismatches. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Explain JSON field conventions (content_length, max_output, etc.), document decimal vs. binary conventions per vendor, and provide guidance for contributors adding or updating model configs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add Tencent Hunyuan, Xiaomi MiMo, HuggingFace, and full Bedrock coverage. Add 'Aggregators & Platforms' section listing 27 platforms that inherit values from upstream model creators. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/model.md`:
- Around line 55-57: Update the Decimal (base-10) row in the convention table to
describe the examples as base-10 or vendor-defined rounded values, rather than
claiming they are powers of 10. Preserve the existing examples unless needed for
accuracy.
- Line 60: Update the power-of-two test in the quick test description to state
that n must be a positive integer, and parenthesize the bitwise expression so
the condition explicitly requires n > 0 alongside n & (n-1) == 0.
- Line 23: Update the fenced diagram block in model.md to specify the text
language identifier, changing the opening fence to use text and preserving the
diagram content unchanged.
- Around line 64-90: Update the vendor convention table in the documentation to
avoid asserting uniform binary or decimal rules where catalogs contain
exceptions, including OpenAI’s 1,050,000 and xAI’s 500K limits. Replace the
convention columns with model-specific examples that reflect each documented
value, or remove unsupported vendor-wide convention claims while preserving the
exact-number guidance.
🪄 Autofix
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 Plus
Run ID: 6d60bc51-cd2c-46ba-8ee8-b7bdf31fee8b
📒 Files selected for processing (2)
conf/all_models.jsonconf/model.md
There was a problem hiding this comment.
♻️ Duplicate comments (1)
conf/model.md (1)
81-84: 🗄️ Data Integrity & Integration | 🟠 MajorKeep vendor limits model-specific.
These rows still describe platforms or model families as if each has one limit convention. This can mislead updates to
conf/all_models.json, which storescontent_lengthandmax_outputindependently.
- Line 81: Amazon Nova documents different limits for Premier, Pro, Lite, and Micro. Current specifications include 1M, 300K, and 128K context windows, with a 10K maximum output. The
128K, 300Kand5Kvalues are not a complete model mapping. (docs.aws.amazon.com)- Line 82: Perplexity exposes Sonar and third-party OpenAI, Anthropic, Google, and xAI models. A single Perplexity convention cannot describe all of these models. (docs.perplexity.ai)
- Lines 83-84: Map Tencent Hunyuan and Xiaomi MiMo values to named models. Xiaomi's official model cards already show different limits, including 262,144 for MiMo-V2-Flash and 1M for MiMo-V2.5. (huggingface.co)
Replace these rows with model-specific examples or
Varies, and link each exact model specification.Proposed direction
-| **Amazon (Bedrock / Nova)** | Decimal (128K, 300K) | Decimal (5K) | ... -| **Perplexity** | Decimal (128K, 200K) | Binary (128K) | ... -| **Tencent (Hunyuan)** | Decimal (32K, 131K, 262K) | Decimal (8K, 64K) | ... -| **Xiaomi (MiMo)** | Binary (1M) | Binary (8K) | ... +| **Amazon (Nova)** | Model-specific | Model-specific | ... +| **Perplexity** | Model-specific | Model-specific | ... +| **Tencent (Hunyuan)** | Model-specific | Model-specific | ... +| **Xiaomi (MiMo)** | Model-specific | Model-specific | ...🤖 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/model.md` around lines 81 - 84, Update the Amazon (Bedrock / Nova), Perplexity, Tencent (Hunyuan), and Xiaomi (MiMo) rows in the model-limits table to use named model-specific entries or “Varies” rather than aggregated vendor-level limits. Ensure each listed content_length and max_output value maps to the corresponding model in conf/all_models.json, and link every exact specification to its authoritative model documentation.
🤖 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.
Duplicate comments:
In `@conf/model.md`:
- Around line 81-84: Update the Amazon (Bedrock / Nova), Perplexity, Tencent
(Hunyuan), and Xiaomi (MiMo) rows in the model-limits table to use named
model-specific entries or “Varies” rather than aggregated vendor-level limits.
Ensure each listed content_length and max_output value maps to the corresponding
model in conf/all_models.json, and link every exact specification to its
authoritative model documentation.
- Kimi: max_output is dynamic (context - input_tokens), not fixed 128K - DeepSeek: note 'varies by model' instead of implying uniformity - GLM: use exact integers (128000, 204800) instead of ambiguous '128K' - Add dynamic max_output explanation to field description Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Fix minimax m2 series, grok-4, z-ai/glm-5.1 to match provider configs - Add 129 models from provider configs that were missing from all_models.json - 352 of 359 provider models now match exactly (98%) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
For models with conflicting values across provider files, use the most common value. 352 of 359 provider models match exactly; remaining 7 have conflicts within PR infiniflow#17836 itself. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17839 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 650 650
Misses 39 39
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
x-ai/grok-4.3 had stale aliases claiming to be grok-3/grok-3-fast/ grok-3-mini, causing incorrect model matching. Remove those aliases so grok-3 maps to its own entry (cl=131072). Remaining 4 mismatches are MiniMax/Zhipu values that cannot be verified (official docs network unreachable). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per official vendor documentation: - MiniMax M2/M2.1/M2.5/M2.7: max_output=128000 (not 16384/196608) - GLM-5.1: context_length=200000, max_output=128000 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Uncomment the assertion for deepseek-v4-pro max_output (393216). Note: Test reveals a pre-existing duplicate alias issue for Qwen/Qwen3-Max that needs separate fixing. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Add table of contents for navigation - Add concrete JSON example for a complete model entry - Add Thinking and Tools object structure documentation - Add dynamic max_output explanation to relationship diagram - Add Quick Reference section (model_types, token rules, validation cmd) - Add Troubleshooting section (duplicate alias, not found, mismatch) - Fix MiniMax values in vendor table (204800, 128000) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
conf/model.md (1)
22-35: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winDocument the embedding-specific fields.
The runtime
Modelschema also exposesmax_dimensionanddimensionsfor embedding models. The table says entries support the listed fields, but it omits both fields. Add them, or state that this table is intentionally partial.Proposed fix
| `class` | string | No | Provider-specific model class used to select the correct driver (e.g. `glm`, `kimi`). | +| `max_dimension` | integer | No | Maximum supported embedding dimension. | +| `dimensions` | integer[] | No | Supported embedding dimensions. | | `alias` | string[] | No | Alternative names for the same model. Used for model lookup when a tenant refers to the model by an alias. **Must be unique across all models.** |🤖 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/model.md` around lines 22 - 35, Update the model-entry field table in the surrounding documentation to include the embedding-specific max_dimension and dimensions fields exposed by the runtime Model schema, including their types, optionality, and purpose; keep the existing field descriptions unchanged.
🤖 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/model.md`:
- Around line 56-60: Update the JSON examples containing inline // comments
under the thinking and tools sections to use jsonc fences, preserving the
existing example content and explanations.
- Line 28: Update the max_output description in the model configuration
documentation so the statement about fixed vendor limits or dynamic calculation
is a complete sentence, while preserving its existing meaning and references.
- Around line 102-108: Update the Migration Note for the split `max_tokens`
fields to explicitly require every migrated model to define both
`content_length` and `max_output`. State that each value must come from the
official vendor model specification, preserving the existing mapping and
distinction between context window and generation cap.
---
Outside diff comments:
In `@conf/model.md`:
- Around line 22-35: Update the model-entry field table in the surrounding
documentation to include the embedding-specific max_dimension and dimensions
fields exposed by the runtime Model schema, including their types, optionality,
and purpose; keep the existing field descriptions unchanged.
🪄 Autofix
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 Plus
Run ID: 36b9570f-28fb-48b8-b4ec-ee4b91d02cf9
📒 Files selected for processing (3)
conf/all_models.jsonconf/model.mdinternal/entity/models/gitee_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/entity/models/gitee_test.go
- Add `text` fence to field relationship diagram (MD040) - Complete max_output description as a full sentence - Use `jsonc` fences for JSON examples with inline comments - Require both content_length and max_output in migration note Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ow#17836 CI was failing because conf/all_models.json contained 53 case-insensitive duplicate entries (e.g. Qwen/Qwen3-Max vs qwen/qwen3-max) added during the provider-config alignment, which made InitProviderManager reject the catalog. - Remove the 53 duplicate entries; surviving canonical entries already cover them via case-insensitive alias lookup. - Align content_length/max_output of 32 kept entries with the official values verified in PR infiniflow#17836 (provider configs). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
validateEmbeddingDimension (model_service.go) accepts any requested dimension up to max_dimension when the dimensions array is empty; a non-empty array requires an exact match. Update the field table to match the actual runtime behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
After the all_models.json migration (PR infiniflow#17839) a chat model has both content_length (context window) and max_output (generation cap). The knowledge_compiler prompt-budget helpers (wikiMapMaxTokens, deriveWikiPlanBudget, buildClusterContent) need the context window, but the wiring fed them max_output, which collapsed the per-chunk input quotas (e.g. raptor's (max_output - max_token) / n ~= 0). - Add ModelProviderService.ResolveModelContextLength to read the model's content_length from the factory catalog (accepts a tenant model UUID or a model@instance@provider composite name; unknown -> 0 so callers fall back to the default window). - Wire the compiler's deps.ModelContextLen from content_length instead of ResolveModelConfig's max_output. - Rename the budget parameter/field to modelContextLen / ModelContextLen across wiki, raptor and deps for a consistent naming style. - Add service tests covering the UUID and composite resolution paths plus the unknown-model fallback.
After the all_models.json migration (PR infiniflow#17839) a chat model has both content_length (context window) and max_output (generation cap). The knowledge_compiler prompt-budget helpers (wikiMapMaxTokens, deriveWikiPlanBudget, buildClusterContent) need the context window, but the wiring fed them max_output, which collapsed the per-chunk input quotas (e.g. raptor's (max_output - max_token) / n ~= 0). - Add ModelProviderService.ResolveModelContextLength to read the model's content_length from the factory catalog (accepts a tenant model UUID or a model@instance@provider composite name; unknown -> 0 so callers fall back to the default window). - Wire the compiler's deps.ModelContextLen from content_length instead of ResolveModelConfig's max_output. - Rename the budget parameter/field to modelContextLen / ModelContextLen across wiki, raptor and deps for a consistent naming style. - Add service tests covering the UUID and composite resolution paths plus the unknown-model fallback.
After the all_models.json migration (PR infiniflow#17839) a chat model has both content_length (context window) and max_output (generation cap). The knowledge_compiler prompt-budget helpers (wikiMapMaxTokens, deriveWikiPlanBudget, buildClusterContent) need the context window, but the wiring fed them max_output, which collapsed the per-chunk input quotas (e.g. raptor's (max_output - max_token) / n ~= 0). - Add ModelProviderService.ResolveModelContextLength to read the model's content_length from the factory catalog (accepts a tenant model UUID or a model@instance@provider composite name; unknown -> 0 so callers fall back to the default window). - Wire the compiler's deps.ModelContextLen from content_length instead of ResolveModelConfig's max_output. - Rename the budget parameter/field to modelContextLen / ModelContextLen across wiki, raptor and deps for a consistent naming style. - Add service tests covering the UUID and composite resolution paths plus the unknown-model fallback.
After the all_models.json migration (PR infiniflow#17839) a chat model has both content_length (context window) and max_output (generation cap). The knowledge_compiler prompt-budget helpers (wikiMapMaxTokens, deriveWikiPlanBudget, buildClusterContent) need the context window, but the wiring fed them max_output, which collapsed the per-chunk input quotas (e.g. raptor's (max_output - max_token) / n ~= 0). - Add ModelProviderService.ResolveModelContextLength to read the model's content_length from the factory catalog (accepts a tenant model UUID or a model@instance@provider composite name; unknown -> 0 so callers fall back to the default window). - Wire the compiler's deps.ModelContextLen from content_length instead of ResolveModelConfig's max_output. - Rename the budget parameter/field to modelContextLen / ModelContextLen across wiki, raptor and deps for a consistent naming style. - Add service tests covering the UUID and composite resolution paths plus the unknown-model fallback.
Summary
Update
conf/all_models.json: replace legacymax_tokenswithcontent_length+max_outputfor all 2,178 chat/vision models, with values verified against official vendor documentation.Changes
Config
max_tokens→content_length+max_output(2,178 entries)Documentation
conf/model.md— comprehensive configuration referenceTests
gitee_test.goassertion for deepseek-v4-pro max_output (393216)Vendor Convention Reference
See
conf/model.mdfor full details and source links.