feat(providers): BYOK-routability-aware workspace-create enforcer (cp#529) #2256
Reference in New Issue
Block a user
Delete Branch "feat/cp529-byok-routability-enforcer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
cp#529 — Option C (CTO-approved): routability-aware enforcer
validateRegisteredModelForRuntimenow allows a model if it is on the runtimes platform menu (ModelsForRuntime) ORDeriveProviderresolves a native provider. Wires confirmed-non-platform BYOK providers into claude-code/hermes/openclaw as name-only native arms (zero platform-menu change) + widens their prefix matchers to accept both slash and colon BYOK id forms.Billing guardrail: only non-platform (BYOK) providers are wired. Platform-shared vendors (openai/gemini/minimax/anthropic, and groq which has no provider) are deliberately NOT wired, so their ids stay residual drift rather than billing a customers model through the platform key.
Result (drift checker): claude-code fully resolves (27/27); residual = only platform-shared ids — hermes
anthropic/·gemini/·openai/·minimax/(12), codexcodex-minimax(1), openclawgroq:·openai:·minimax:(7). Those get trimmed from templates / restored via dedicated BYOK-vendor providers in a follow-up.Build + providers/gen/handlers tests green.
⚠️ Coordination: overlaps the same files (providers.yaml, registry_gen.go, runtimes_test.go, sync_canonical_test.go) as open PR #2241 (cp#521) which takes the opposite trim approach on claude-code. CTO chose routability (Option C) so cp#529 supersedes that ids trim, but #2241 has other valuable changes (MiniMax-M2.7 rename, canvas-deploy-status). Co-review + rebase before merge.
Paired with molecule-controlplane
feat/cp529-byok-routability-checker(byte-synced providers.yaml — must land together).Refs cp#529.
QA (cp#529 routability-aware enforcer). Reviewed: validateRegisteredModelForRuntime now allows model ∈ ModelsForRuntime OR DeriveProvider resolves; BYOK passthrough providers wired as name-only arms (no platform-menu change); fail-open branches preserved; tests cover BYOK-pass + unroutable-422 + platform-unaffected. Required CI green, sync-gate green. Approve.
Security (cp#529). BILLING GUARDRAIL verified: only confirmed-non-platform providers (own auth_env) wired into BYOK runtime arms; platform-shared providers (anthropic-api/openai-*/moonshot/minimax/google/vertex/platform) deliberately NOT wired, so a BYOK menu id can never route through a platform key. IsPlatform unchanged (name=='platform'), so BYOK derives to byok billing. No new secret/authz surface. Approve.