Add per-agent model assignment shared across devx, claw, and d2esupport - #260
Merged
Conversation
…selection, env as fallback
…selection feature Critical: - claw/d2esupport's devx loopback now only throws on a real 500 (devx found a selection but failed to resolve it); any other non-ok status (devx not loaded, bad token) falls back to the env-based config instead of hard- failing every turn. - resolveAgentModel now falls back to null (not a 500) when the lookup query itself fails, since an unapplied migration means "we don't know if anything is configured", not "something is configured but broken". Gate and key-decrypt failures after a row is found still propagate unchanged. Also trims setAgentModelSelection's ownership-check SELECT to the columns it actually needs. Important: - Add activateDevxProviderConfig, the one function that keeps provider_configs.is_active/devx.settings and the unified agent_model_selection table's agent='devx' row in sync. Both the legacy PUT /provider-configs/:id/activate route and the new PUT /agent-model-selection/devx route now go through it, so the two panels can no longer drift. - Add clearAgentModelSelection + DELETE /agent-model-selection/:agent so claw/d2esupport assignments can be reverted to their env-based fallback; devx (which has no "unset" state) rejects the clear with a 400. Wired into the Settings UI as a "Use env default (unassigned)" option. - GET /agent-model/:agent (the only route that returns a decrypted key) now sends Cache-Control: no-store and documents why it's allowed to.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #260 +/- ##
========================================
Coverage 52.64% 52.64%
========================================
Files 169 169
Lines 72798 72798
========================================
Hits 38323 38323
Misses 34475 34475
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
No description provided.