Add provider binding validation and live-chat agent config#124
Merged
Conversation
The Trading Assistant (live-chat, L5) was getting overridden from anthropic/claude-sonnet to GitHub Models/gpt-4o-mini by the L5 layer default in agent-models.json, causing a 401 "models permission required" error. Add explicit per-agent override to keep it on Anthropic. Also adds TestProviderBinding tests to catch agent-to-provider binding mismatches in CI, and fixes misleading GitHub PAT scope comment. https://claude.ai/code/session_01CYT2ttbEzMGq2uoZgRHo2X
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
This PR adds comprehensive validation to ensure all agents have properly configured providers and models, with a new test suite that verifies provider bindings against the librechat configuration. It also explicitly configures the live-chat agent to use Anthropic's Claude Sonnet 4.6 model.
Key Changes
TestProviderBinding: Validates that every agent has an effective provider and model by resolving overrides fromagent-models.jsonagainst baseagents.jsonconfiguration.envkeyslibrechat-user.yamlImplementation Details
effective_assignmentsfixture resolves the provider/model hierarchy: base agent config → layer defaults → per-agent overridesNATIVE_PROVIDERSconstant identifies providers that don't require YAML endpoint configurationtest_live_chat_not_downgradedtest acts as a safeguard to prevent accidental cost-cutting that would degrade the primary chat experiencelibrechat-user.yamlis not present (e.g., in minimal test environments)https://claude.ai/code/session_01CYT2ttbEzMGq2uoZgRHo2X