Repository navigation
Conversation
…fallback
Two compounding bugs in the community-agent model chain:
1. arcee-ai/trinity-large-preview:free is dead at OpenRouter (404 No
endpoints found). Every fallback hop into trinity errored, and it was
referenced in:
- OPENROUTER_FREE_FALLBACKS (drives dev-agent fallbacks)
- defaults.model.fallbacks (community-agent fallback chain)
- openrouter provider catalog (model registry)
- 2 LiteLLM virtual-key allowlists
- globalModelConfigService.ts default community fallbacks
- 7 community-agent preset recommendedModel entries
2. The community fallback chain had no explicit guard against re-introducing
openai-codex/* models. Community agents must never burn paid Codex quota
even on fallback (they aren't issued Codex credentials anyway, but the
guarantee was implicit). Added a hard assertion in
applyOpenClawModelDefaults that throws if any openai-codex/* model is
present in defaults.model.{primary,fallbacks} — fail the next provision
instead of silently leaking quota.
After this PR + Deploy Dev + reprovision-all, the gateway PVC will reflect:
- defaults.model.primary = openrouter/nvidia/nemotron-3-super-120b-a12b:free
- defaults.model.fallbacks = [gemini-2.5-flash, lite, 2.0-flash] (inert
placeholders until GEMINI_API_KEY is reinstated)
- models.providers.openrouter = { baseUrl, api, models: [nemotron] }
(the OR provider was missing from the live PVC entirely, which is why
fakesam's nemotron call 401'd "Missing Authentication header" — gateway
had no provider definition to attach the key to)
If nemotron 429s while gemini is dead, community agents go silent for that
heartbeat and retry next interval. Better than burning Codex.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01
added a commit
that referenced
this pull request
May 3, 2026
…fallback (#282) Two compounding bugs in the community-agent model chain: 1. arcee-ai/trinity-large-preview:free is dead at OpenRouter (404 No endpoints found). Removed from OPENROUTER_FREE_FALLBACKS, defaults.model.fallbacks, OR provider catalog, 2 LiteLLM virtual-key allowlists, globalModelConfigService communityAgentModel.fallbacks, and 7 community-preset recommendedModel entries. 2. Added a hard assertion in applyOpenClawModelDefaults that throws if any openai-codex/* model appears in defaults.model.{primary,fallbacks}. Cheap defense-in-depth: a future edit that accidentally puts Codex in the community chain will fail the next provision, not silently burn the weekly Codex quota. After Deploy Dev + reprovision-all the gateway PVC will reflect: - defaults.model.primary = openrouter/nvidia/nemotron-3-super-120b-a12b:free - models.providers.openrouter = { baseUrl, api, models: [nemotron] } (the OR provider was missing from the live PVC entirely, which is why fakesam's nemotron call 401'd "Missing Authentication header" — gateway had no provider definition to attach the key to) If nemotron 429s while gemini is dead, community agents go silent for that heartbeat and retry next interval. Better than burning Codex. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Squash-merged locally as 77e10c3 to preserve Sam Xu git author attribution. Closing. |
1 task
samxu01
added a commit
that referenced
this pull request
May 3, 2026
PR #282 removed arcee-ai/trinity-large-preview:free (dead at OR), but the test assertion still required it. Update to require gemini-2.5-flash present (inert placeholder), explicitly exclude trinity (regression guard), and preserve openai-codex/* exclusion checks. Two pre-existing failures (podController, dmService) flagged separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
samxu01
added a commit
that referenced
this pull request
May 3, 2026
…ordination (#285) Three changes to reduce 429-induced lane stalls and lost requests: 1. Drop gemini from fallback chains. GEMINI_API_KEY belongs to project 946211286881 where Gemini API is not enabled (403 every call). No plan to provision a working key, so removing rather than chaining 60-120s of dead-end retries per failed request. 2. Drop trinity from LiteLLM model_list and all fallbacks. Already dead at OpenRouter (404 No endpoints found, removed gateway-side in PR #282). 3. num_retries 0 → 1, retry_after: 1. The 1s delay gives the rotator sidecar time to swap auth.json before LiteLLM reads it for the retry, so the failed request lands on a fresh Codex account on retry. Same- prompt retry on 429 doesn't bill (4XX = no charge), so the retry across the rotator is genuinely free until success. Bounded to 1 retry to cap the cascade ceiling under burst load (multi-retry caused "symmetric account-2/3 depletion" per 2026-05-03 incident). Final fallback: gpt-5.4{,-mini,-nano} → nemotron only. Nemotron itself has no fallback — fail fast, next request lands on rotated Codex account. Also synced agent-configs.yaml seed defaults (consumed by fresh gateway pods before provisioner runs) and the dev-local external/litellm/config.yaml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 task
samxu01
added a commit
that referenced
this pull request
May 4, 2026
… clarified (#289) Update Agent Runtime quick-rule for community/dev model routing to match the post-burn-fix state (PRs #282, #284, #285): - Drop trinity reference (model dead at OpenRouter) - Add aria to dev-agent list - Note hard guardrail in applyOpenClawModelDefaults blocking codex from community fallback chain - Document GEMINI_API_KEY's wrong-project status (946211286881) so future debugging doesn't waste time - Document new retry policy: num_retries=1 + retry_after=1 lets codex-auth-rotator swap auth.json before retry reads it Pure docs change, no test deltas. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Why
Investigating fakesam's session failing on every model in the chain:
openai-codex/gpt-5.4-minigoogle/gemini-2.5-flashopenrouter/nvidia/nemotron-3-super-120b-a12b:freeopenrouter/arcee-ai/trinity-large-preview:freeTwo root causes:
models.providersonly containsopenai-codex, noopenrouterentry. So when nemotron is requested, the gateway has no provider definition to attach the key to → 401. Cause:applyOpenClawModelDefaultswrites the OR provider, but it only runs insideprovisionOpenClawAccount. No reprovision has happened since the code that adds the provider was last updated.This PR fixes #1 in code. #2 is fixed by running
reprovision-allafter the PR deploys.What
arcee-ai/trinity-large-preview:freefrom every reference in the provisioner:OPENROUTER_FREE_FALLBACKSconstantdefaults.model.fallbackscommunity chainmodels.providers.openroutermodel catalogglobalModelConfigService.tscommunityAgentModel.fallbacksrecommendedModelentries (presets.ts) from trinity → nemotronapplyOpenClawModelDefaultsthrows if anyopenai-codex/*model appears indefaults.model.{primary,fallbacks}. Cheap defense-in-depth so a future edit can't accidentally re-introduce Codex into the community chain and silently burn quota.Behavioral change
Community agents when nemotron 429s:
Dev agents (theo/nova/pixel/ops/aria) — unchanged. Still use
openai-codex/gpt-5.4-miniprimary via the per-agent override, and their fallback list still includes nemotron + gemini placeholders.Test plan
reprovision-all. Confirm new gateway PVC/state/moltbot.jsonshows:agents.defaults.model.primary = openrouter/nvidia/nemotron-3-super-120b-a12b:free(not gpt-5.4-mini)models.providers.openrouter = { baseUrl, api, models: [nemotron] }(provider entry now exists)model.primary = openai-codex/gpt-5.4-mini🤖 Generated with Claude Code