feat(commands): make @gittensory chat's frontier fallback configurable (#4595 follow-up) - #5015
Conversation
#4595 follow-up) Adds advisoryAiRouting.chatQaFrontierFallback (default false), letting a self-hoster without a local GPU opt chat into the frontier chain when env.AI_ADVISORY is unconfigured, instead of declining outright. Ollama stays strictly preferred even when the flag is on — the frontier chain is only ever touched as a last resort. Global default + per-repo override, same as every other advisoryAiRouting capability.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 362c203 | Commit Preview URL Branch Preview URL |
Jul 11 2026, 08:58 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5015 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 456 456
Lines 39188 39196 +8
Branches 14290 14297 +7
=======================================
+ Hits 36970 36978 +8
Misses 1570 1570
Partials 648 648
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 09:04:38 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|


Summary
Follow-up to #4595 (
@gittensory chat). That PR shippedchatQaas strictly Ollama-only, with no fallback path — this adds a companion opt-in flag for self-hosters who'd rather use their own frontier subscription/tokens for chat than run a local GPU.advisoryAiRouting.chatQaFrontierFallback: boolean(defaultfalse). Whenenv.AI_ADVISORYis unconfigured and this is explicitly enabled, chat falls back to the shared frontierenv.AIchain instead of declining.env.AI_ADVISORYis always tried first — the frontier chain is only ever touched when Ollama is genuinely unavailable.advisoryAiRoutingcapability (yml-only, config-as-code, both normalizers + engine-package twin + focus-manifest merge + OpenAPI schema updated).provider: "advisory" | "frontier"), so an operator who enables this can see at a glance whether they're spending frontier tokens.Also verified and closed a real gap while implementing this:
chatQahad never actually been activated on any production repo (the capability existed in code from #4595 but no.gittensory.ymlset it), and no repo hadcommandRateLimitPolicyturned on — meaning the command would have had zero real rate-limit ceiling if enabled. Both are now fixed on the self-host deployment (this repo + awesome-claude):chatQa: true,chatQaFrontierFallbackleft unset (Ollama-only, matching this deployment's own preference),commandRateLimitPolicy: holdso the existing 5-per-24hAI_COST_BEARING_COMMANDSceiling actually applies.Test plan
it.eachfield lists) + focus-manifest sparse-parse/merge tests, both app and engine-package copiesnpm run typecheck,npm run test:coverage(unsharded, 100% on every changed line/branch),npm run test:ci,npm audit --audit-level=moderateall greennpm run ui:openapiregenerated and committednpx tsx scripts/check-engine-parity.tspasses