Skip to content

fix(combos): sync only models whose provider is registered in the gateway - #24

Merged
elielsousa-pathbit merged 2 commits into
masterfrom
fix/connection-aware-combos
Oct 20, 2026
Merged

elielsousa-pathbit merged 2 commits into
masterfrom
fix/connection-aware-combos

Conversation

@logins-pathbit

Copy link
Copy Markdown
Contributor

What happens

sync_combos upserts 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) and All models failed: No active credentials for provider when 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 lists mistral/* and ag/* models and each call fails through them before reaching Groq.

Why

get_default_combos returns static lists and sync_combos writes them verbatim (src/nine_rtksync/combos.py). The sync never looks at what is actually registered in the gateway database.

What this changes

sync_combos now reads the registered providers (providerConnections for vendors, providerNodes for custom OpenAI-compatible endpoints) and:

  • keeps only combo models whose provider prefix is registered;
  • removes standard combos that would be left with zero models;
  • recovers automatically on the next cycle once a provider is connected.

The ag/ plan prefix used in combos is mapped to the antigravity / gemini-cli / google vendor names recorded in the connections table.

User-created combos are never touched: only the standard ids returned by get_default_combos are filtered or removed.

Regression coverage

tests/test_combos.py gains 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.

…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).
@elielsousa-pathbit
elielsousa-pathbit merged commit 8cc663c into master Oct 20, 2026
6 checks passed
@elielsousa-pathbit
elielsousa-pathbit deleted the fix/connection-aware-combos branch October 20, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants