Skip to content

feat(executor): fix payloadModelRulesMatch for unconditional rules#924

Closed
KooshaPari wants to merge 3 commits intomainfrom
fix/pr-11-event-order
Closed

feat(executor): fix payloadModelRulesMatch for unconditional rules#924
KooshaPari wants to merge 3 commits intomainfrom
fix/pr-11-event-order

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

Summary

Fixes payloadModelRulesMatch to correctly handle unconditional rules (rules with empty Name).

Changes

  • Fix: Empty Name in a rule means 'applies to all models'
  • Tests: 6 test functions covering 30+ test cases for split-count regression coverage

Files Changed

  • pkg/llmproxy/executor/payload_helpers.go (fix)
  • pkg/llmproxy/executor/payload_helpers_test.go (367 lines, new)
  • pkg/llmproxy/auth/qwen/qwen_token.go (minor)

Test Results

  • config: PASS (2 tests)
  • util: PASS (20 tests)
  • executor: blocked by pre-existing import cycle

claude added 2 commits March 27, 2026 05:11
…r packages

This commit removes redundant split files that were created during the refactor
split, consolidating each package back to a single implementation source:

management package:
- Removed auth_file_mgmt.go, auth_gemini.go (duplicates of auth_files.go)
- Removed auth_helpers.go, auth_file_crud.go, auth_file_patch.go (duplicates)
- Removed auth_kiro.go, auth_status.go (duplicates)
- Removed auth_anthropic.go, auth_antigravity.go, auth_codex.go
- Removed auth_github.go, auth_iflow.go, auth_kilo.go, auth_kimi.go, auth_qwen.go

executor package:
- Removed kiro_streaming_event_parser.go, kiro_streaming_transform.go
- Removed kiro_streaming_websearch.go, kiro_streaming_fallback.go
- Removed kiro_auth.go, kiro_transform.go, kiro_streaming_init.go

config package:
- Removed the entire split config module (config_io.go, config_persistence.go,
  config_providers.go, config_types.go, config_validation.go)

The canonical implementations in the monolith files remain unchanged.

Additional changes:
- Updated import paths from sdk/auth to sdk/cliproxy/auth across affected files
- Added Minimax thinking provider package
- Fix payloadModelRulesMatch to treat empty Name as unconditional rule
- Add regression tests for split-count coverage (conditional vs unconditional)
- Tests cover protocol matching, alias targeting, and filter rules
- Include TestPayloadModelRulesMatch, TestPayloadModelCandidates
- Include TestApplyPayloadConfigWithRoot_* (6 test functions, 30+ cases)
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Warning

Rate limit exceeded

@KooshaPari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bcbb823c-b78a-45b7-91c6-29758ddcd78f

📥 Commits

Reviewing files that changed from the base of the PR and between b5df887 and 0b43c18.

📒 Files selected for processing (122)
  • CODE_REFACTOR_SUMMARY.md
  • REFACTOR_COMPLETE_SUMMARY.md
  • REFACTOR_SESSION_FINAL_SUMMARY.md
  • REFACTOR_SESSION_SUMMARY.md
  • SDK_INTEGRATION_STATUS.md
  • go.mod
  • pkg/llmproxy/api/handlers/management/config_lists.go
  • pkg/llmproxy/api/handlers/management/handler.go
  • pkg/llmproxy/api/modules/amp/amp.go
  • pkg/llmproxy/api/modules/amp/model_mapping.go
  • pkg/llmproxy/api/modules/amp/secret.go
  • pkg/llmproxy/api/modules/modules.go
  • pkg/llmproxy/api/server.go
  • pkg/llmproxy/auth/antigravity/auth.go
  • pkg/llmproxy/auth/claude/utls_transport.go
  • pkg/llmproxy/auth/copilot/oauth.go
  • pkg/llmproxy/auth/diff/config_diff.go
  • pkg/llmproxy/auth/diff/diff_generated.go
  • pkg/llmproxy/auth/diff/model_hash.go
  • pkg/llmproxy/auth/diff/models_summary.go
  • pkg/llmproxy/auth/diff/oauth_excluded.go
  • pkg/llmproxy/auth/diff/oauth_model_alias.go
  • pkg/llmproxy/auth/diff/openai_compat.go
  • pkg/llmproxy/auth/gemini/gemini_auth.go
  • pkg/llmproxy/auth/kiro/aws_auth.go
  • pkg/llmproxy/auth/kiro/background_refresh.go
  • pkg/llmproxy/auth/kiro/codewhisperer_client.go
  • pkg/llmproxy/auth/kiro/oauth.go
  • pkg/llmproxy/auth/kiro/oauth_web.go
  • pkg/llmproxy/auth/kiro/refresh_manager.go
  • pkg/llmproxy/auth/kiro/social_auth.go
  • pkg/llmproxy/auth/kiro/sso_oidc.go
  • pkg/llmproxy/auth/kiro/usage_checker.go
  • pkg/llmproxy/auth/qwen/qwen_auth.go
  • pkg/llmproxy/auth/qwen/qwen_token.go
  • pkg/llmproxy/auth/synthesizer/config.go
  • pkg/llmproxy/auth/synthesizer/context.go
  • pkg/llmproxy/auth/synthesizer/helpers.go
  • pkg/llmproxy/auth/synthesizer/synthesizer_generated.go
  • pkg/llmproxy/auth/vertex/vertex_credentials.go
  • pkg/llmproxy/cmd/anthropic_login.go
  • pkg/llmproxy/cmd/antigravity_login.go
  • pkg/llmproxy/cmd/cursor_login.go
  • pkg/llmproxy/cmd/generic_apikey_login.go
  • pkg/llmproxy/cmd/github_copilot_login.go
  • pkg/llmproxy/cmd/iflow_cookie.go
  • pkg/llmproxy/cmd/iflow_login.go
  • pkg/llmproxy/cmd/kilo_login.go
  • pkg/llmproxy/cmd/kimi_login.go
  • pkg/llmproxy/cmd/kiro_login.go
  • pkg/llmproxy/cmd/login.go
  • pkg/llmproxy/cmd/minimax_login.go
  • pkg/llmproxy/cmd/openai_device_login.go
  • pkg/llmproxy/cmd/openai_login.go
  • pkg/llmproxy/cmd/qwen_login.go
  • pkg/llmproxy/cmd/roo_login.go
  • pkg/llmproxy/cmd/run.go
  • pkg/llmproxy/cmd/setup.go
  • pkg/llmproxy/cmd/thegent_login.go
  • pkg/llmproxy/cmd/vertex_import.go
  • pkg/llmproxy/config/config_io.go
  • pkg/llmproxy/config/config_persistence.go
  • pkg/llmproxy/config/config_providers.go
  • pkg/llmproxy/config/config_types.go
  • pkg/llmproxy/config/config_validation.go
  • pkg/llmproxy/config/sdk_config.go
  • pkg/llmproxy/executor/aistudio_executor.go
  • pkg/llmproxy/executor/antigravity_executor.go
  • pkg/llmproxy/executor/claude_executor.go
  • pkg/llmproxy/executor/codex_executor.go
  • pkg/llmproxy/executor/gemini_cli_executor.go
  • pkg/llmproxy/executor/gemini_executor.go
  • pkg/llmproxy/executor/gemini_vertex_executor.go
  • pkg/llmproxy/executor/github_copilot_executor.go
  • pkg/llmproxy/executor/iflow_executor.go
  • pkg/llmproxy/executor/kilo_executor.go
  • pkg/llmproxy/executor/kimi_executor.go
  • pkg/llmproxy/executor/logging_helpers.go
  • pkg/llmproxy/executor/oauth_upstream.go
  • pkg/llmproxy/executor/openai_compat_executor.go
  • pkg/llmproxy/executor/openai_models_fetcher.go
  • pkg/llmproxy/executor/payload_helpers.go
  • pkg/llmproxy/executor/payload_helpers_test.go
  • pkg/llmproxy/executor/qwen_executor.go
  • pkg/llmproxy/executor/thinking_providers.go
  • pkg/llmproxy/interfaces/error_message.go
  • pkg/llmproxy/logging/global_logger.go
  • pkg/llmproxy/registry/model_registry.go
  • pkg/llmproxy/thinking/apply.go
  • pkg/llmproxy/thinking/provider/iflow/apply.go
  • pkg/llmproxy/thinking/provider/minimax/minimax.go
  • pkg/llmproxy/thinking/strip.go
  • pkg/llmproxy/translator/antigravity/gemini/antigravity_gemini_request.go
  • pkg/llmproxy/translator/gemini-cli/gemini/gemini-cli_gemini_request.go
  • pkg/llmproxy/translator/gemini/gemini-cli/gemini_gemini-cli_request.go
  • pkg/llmproxy/translator/gemini/gemini/gemini_gemini_request.go
  • pkg/llmproxy/translator/openai/claude/openai_claude_response.go
  • pkg/llmproxy/util/provider.go
  • pkg/llmproxy/util/provider_test.go
  • pkg/llmproxy/util/proxy.go
  • pkg/llmproxy/util/util.go
  • pkg/llmproxy/util/util_test.go
  • pkg/llmproxy/watcher/clients.go
  • pkg/llmproxy/watcher/config_reload.go
  • pkg/llmproxy/watcher/diff/config_diff.go
  • pkg/llmproxy/watcher/diff/model_hash.go
  • pkg/llmproxy/watcher/diff/models_summary.go
  • pkg/llmproxy/watcher/diff/oauth_excluded.go
  • pkg/llmproxy/watcher/diff/oauth_model_alias.go
  • pkg/llmproxy/watcher/diff/openai_compat.go
  • pkg/llmproxy/watcher/dispatcher.go
  • pkg/llmproxy/watcher/events.go
  • pkg/llmproxy/watcher/synthesizer/config.go
  • pkg/llmproxy/watcher/synthesizer/context.go
  • pkg/llmproxy/watcher/synthesizer/file.go
  • pkg/llmproxy/watcher/synthesizer/helpers.go
  • pkg/llmproxy/watcher/watcher.go
  • sdk/auth/filestore.go
  • sdk/config/config.go
  • test/amp_management_test.go
  • test/builtin_tools_translation_test.go
  • test/thinking_conversion_test.go

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-11-event-order

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add path-escape validation to resolveAuthPath
- Ensure all file paths stay within configured base directory
- Normalize paths with filepath.Clean before validation
- Fixes CodeQL go/path-injection alerts
@KooshaPari
Copy link
Copy Markdown
Owner Author

Superseded by rebased PR #927, which has been merged.

@KooshaPari KooshaPari closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants