Conversation
…atible providers Fix three critical bugs preventing parameter filtering from working correctly with OpenAI-compatible providers like Grok and DeepSeek: ## Bug #1: Executor ordering - ApplyThinking re-adds filtered parameters - Move ApplyPayloadConfigWithRoot() to run AFTER ApplyThinking() in openai_compat_executor - Ensures filter has final authority over parameters sent to upstream provider - Fixes: reasoning_effort re-injected after filter removes it for suffix models (e.g., grok-3(medium)) ## Bug router-for-me#2: Protocol mismatch - Responses API not recognized by filter rules - Normalize "openai-response" protocol to "openai" in payloadModelRulesMatch() - Filter rules with protocol: "openai" now match both Chat Completions and Responses API - Fixes: Silent filter failures for Responses API requests ## Bug router-for-me#3: Case-sensitive model matching - Make matchModelPattern() case-insensitive by lowercasing both pattern and model - Pattern "grok-*" now correctly matches "Grok-3", "GROK-3", etc. - Improves robustness for real-world model name variations ## Testing - Added 19 comprehensive unit tests in payload_helpers_test.go - Added 9 QA reproduction tests in test/reasoning_effort_filter_test.go - All tests passing (28/28), zero regressions - Verified end-to-end with real provider scenarios ## Documentation - Added FILTER_ARCHITECTURE.md documenting filter system design - Provides reference for future maintenance and extensibility Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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.
…atible providers
Fix three critical bugs preventing parameter filtering from working correctly with OpenAI-compatible providers like Grok and DeepSeek:
Bug #1: Executor ordering - ApplyThinking re-adds filtered parameters
Bug router-for-me#2: Protocol mismatch - Responses API not recognized by filter rules
Bug router-for-me#3: Case-sensitive model matching
Testing
Documentation