fix(manifest-model-router): use AUTO_MODEL in injectProviderConfig#1492
Open
thomas-norg-ai wants to merge 1 commit intomnfst:mainfrom
Open
fix(manifest-model-router): use AUTO_MODEL in injectProviderConfig#1492thomas-norg-ai wants to merge 1 commit intomnfst:mainfrom
thomas-norg-ai wants to merge 1 commit intomnfst:mainfrom
Conversation
…nd config injection
Two fixes:
1. injectProviderConfig was writing a minimal model object {id:"auto",
name:"auto"} missing input, cost, contextWindow, maxTokens fields.
Now uses exported AUTO_MODEL constant with all required fields.
2. registerProvider was passing models as a nested config object
{baseUrl, api, models: [AUTO_MODEL]} instead of spreading it.
OpenClaw's provider resolution tried to read .input on the config
object (not a model entry), causing TypeError. Now spreads
buildModelConfig() so models is a flat array on the provider.
Fixes mnfst#1464
03a6cc3 to
1203934
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1492 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 123 123
Lines 8002 8002
Branches 3085 3085
=======================================
Hits 7904 7904
Misses 89 89
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
injectProviderConfig was writing a minimal model object {id:"auto", name:"auto"} missing the input, cost, contextWindow, and maxTokens fields. OpenClaw crashes with "Cannot read properties of undefined (reading 'input')" because the model catalog entry has no input field.
Export AUTO_MODEL from auth.ts and use it in provider-inject.ts so the injected config includes all required fields.
Fixes #1464
Summary by cubic
Fixes an OpenClaw crash in the manifest model router by exporting and using the full
AUTO_MODELwhen injecting provider config, ensuring required fields are present. Also spreadsbuildModelConfig(...)during provider registration somodelsis a flat array, preventing a TypeError in provider resolution (fixes #1464).Written for commit 1203934. Summary will update on new commits.