Repository navigation
feat(models): Cloudflare Workers AI preset, model discovery, and expandable failover cascade - #769
Merged
wangzan101 merged 2 commits intoNov 21, 2026
Conversation
shlokkokk
force-pushed
the
feature/cloudflare-workers-ai-preset
branch
2 times, most recently
from
November 20, 2026 18:15
9ad112e to
d7fdb56
Compare
…ndable failover cascade - Add Cloudflare Workers AI provider preset with Account ID auto-injection into base URL. - Support automatic model discovery and capability detection via /models/search. - Filter deprecated models and handle Workers Free plan restrictions gracefully. - Distinguish multiple Cloudflare accounts in the UI with automatic account snippet badging. - Expand maximum failover models from 2 to 8 for multi-account resilience. - Redesign failover UI with an expandable nested cascade tray and accidental removal confirmation dialog. - Localize all fallback strings across 12 UI languages and update provider documentation.
shlokkokk
force-pushed
the
feature/cloudflare-workers-ai-preset
branch
from
November 20, 2026 18:43
d7fdb56 to
dd82224
Compare
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.
Overview
This PR adds a dedicated Cloudflare Workers AI preset and significantly upgrades Mika's failover architecture to support seamless multi-account and multi-provider backup cascades:
Cloudflare Workers AI Preset & Discovery:
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1)./models/search?task=Text%20Generationendpoint with automatic capability parsing (tool calling, vision, context length, reasoning).planned_deprecation_date) and prioritizes free tool-calling models (e.g.llama-3.3-70b,gpt-oss,gemma-4-26b).code 5035/"not available on Workers Free plan") asModelNotAvailableso probe failover continues without stopping.Automatic Multi-Account Badging:
Cloudflare Workers AI (b289…5bbd)vsCloudflare Workers AI (a5c8…3f13)).Expandable Waterfall Failover Cascade:
MAX_FALLBACKS = 8), allowing users to cascade multiple free accounts and backup providers.Primary ➔ Backup #1 ➔ Backup #2).1,2,3) with monospace model IDs and provider subtitles.MikaDialogbefore removing any backup slot from the failover chain to prevent unintended deletions.Localization & Documentation:
README.md,docs/readme/README.zh-CN.md, anddocs/dev/architecture.md.Verification & Testing
ModelCatalogTest.cloudflareWorkersAiSearchesModelsAndParsesCapabilitiespassed.ModelAccessErrorsTestpassed with Cloudflare free plan error tests.ProviderStoreTest,ModelSetupViewModelTest,ProviderPresetsTestpassed.python tools/i18n/translations.py check(passed 100% across all 12 locales / 3,682 resources).SM-S721B): Verified on device with real 23-step autonomous execution using Cloudflare Workers AI (@cf/google/gemma-4-26b-a4b-it) to 100% success.