Repository navigation
fix(combos): sync only models whose provider is registered in the gateway - #24
Merged
Merged
Conversation
…eway The default combos are upserted every sync cycle with hardcoded model lists that reference every supported provider. On a gateway where only some providers are connected, every probe of those combos fails per missing credentials: the router logs 'Model X failed, trying next' for each dead entry and 'All models failed: No active credentials for provider' when the chain empties — every five minutes, forever, even though the failing providers were never connected to this gateway. sync_combos now filters each standard combo to the models whose provider prefix is registered in the gateway database (providerConnections for vendors, providerNodes for custom OpenAI-compatible endpoints) and removes standard combos that lose every model. Combos recover automatically on the next cycle after a provider is connected. The 'ag/' prefix used by combos for Antigravity plans is mapped to the 'antigravity'/'gemini-cli'/'google' vendor names recorded in the connections table. Covered by connection-aware regression tests in tests/test_combos.py: no connections (standard combos removed), partial connection (only the connected provider's models survive), Antigravity connected (ag/* kept), custom node registered (offline combo kept).
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.
What happens
sync_combosupserts the standard combos on every daemon cycle with hardcoded model lists that reference every supported provider. On a gateway where only some providers are connected, every probe of those combos logs one line per dead entry (Model X failed, trying next) andAll models failed: No active credentials for providerwhen the chain empties — every five minutes, indefinitely, for providers that were never connected to this gateway.Steps: connect only one API-key provider (e.g. Groq) to a fresh gateway, let the daemon sync combos, then call any combo such as
arsenal-rapido. The combo still listsmistral/*andag/*models and each call fails through them before reaching Groq.Why
get_default_combosreturns static lists andsync_comboswrites them verbatim (src/nine_rtksync/combos.py). The sync never looks at what is actually registered in the gateway database.What this changes
sync_combosnow reads the registered providers (providerConnectionsfor vendors,providerNodesfor custom OpenAI-compatible endpoints) and:The
ag/plan prefix used in combos is mapped to theantigravity/gemini-cli/googlevendor names recorded in the connections table.User-created combos are never touched: only the standard ids returned by
get_default_combosare filtered or removed.Regression coverage
tests/test_combos.pygains connection-aware cases against a minimal gateway schema: no connections (standard combos removed), partial connection (only the connected provider's models survive), Antigravity connected (ag/*kept), custom node registered (offline combo kept). Full suite: 448 passed.