Repository navigation
Fix task routing: case mismatch prevented cloud provider upgrade (#371) - #404
Merged
Merged
Conversation
…#371) getAvailableCloudProviders() stored PascalCase names ("DeepSeek", "Anthropic") but CLOUD_PROVIDER_FALLBACK uses lowercase ("deepseek", "anthropic"). Set.has() is case-sensitive, so no provider ever matched. Fix: lowercase when adding to the configured set. Discovered via cognition logs: domain='analysis', hasTools=true (2 XML tools), but routing never upgraded because availableProviders.has('deepseek') was false when the set contained 'DeepSeek'.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes task-aware routing’s cloud-provider upgrade check by normalizing configured provider names to lowercase so they match the router’s lowercase fallback IDs.
Changes:
- Normalize
AIProvidersStatusprovider names with.toLowerCase()when building the configured cloud-provider set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 25, 2026
joelteply
added a commit
that referenced
this pull request
Aug 20, 2026
…ported on every target (CI E0432)
`#[cfg(target_os = "macos")]` binds to the NEXT item only. Inserting the new
`device_probe` re-export ABOVE `metal_monitor` in today's adapter refactor silently
moved the gate onto the base and left the macOS-only adapter exported everywhere:
#[cfg(target_os = "macos")]
pub use device_probe::{...}; // the PLATFORM-NEUTRAL base — wrongly gated
pub use metal_monitor::{...}; // the macOS ADAPTER — wrongly ungated
Exactly inverted from the `mod` declarations two lines up (device_probe ungated,
metal_monitor macOS-gated), and exactly inverted from the point of the refactor: the
base is what every backend shares.
Compiled clean on this Mac. E0432 `unresolved import metal_monitor` on every other
host — which is BOTH red CI jobs from one cause: `cargo test --lib` (Linux) and
`cargo check windows-msvc`. I was ready to write the Windows job off as the #404
flake; it was this.
Caught only because CI builds a different target than I do. The local check that
would have caught it does not exist on a Mac (`--no-default-features` can't build
here, #422), so the honest guard is CI itself — which is the argument for not
merging red on a "probably the flake" hunch.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
Summary
getAvailableCloudProviders()stored provider names as PascalCase ("DeepSeek", "Anthropic") from the status APICLOUD_PROVIDER_FALLBACKuses lowercase ("deepseek", "anthropic")Set.has()is case-sensitive → no match → routing never upgraded local personas to cloud.toLowerCase()when populating the setThis was the second bug preventing task-aware routing from working (first was hasTools=false in PR #401).
Test plan
🔄 Task routinglog appears for local personas🤖 Generated with Claude Code