Skip to content

config: support macros in peer apiKey and filters#469

Merged
mostlygeek merged 2 commits intomainfrom
use-claude-code-reviews
Jan 17, 2026
Merged

config: support macros in peer apiKey and filters#469
mostlygeek merged 2 commits intomainfrom
use-claude-code-reviews

Conversation

@mostlygeek
Copy link
Copy Markdown
Owner

Summary

  • Add macro substitution (${MACRO}) and env macro substitution (${env.VAR}) for peer fields: apiKey, filters.stripParams, and filters.setParams
  • Rename validateMetadataForUnknownMacros to validateNestedForUnknownMacros for reuse
  • Update config.example.yaml to show env macro usage in peer apiKey

Add ${env.VAR_NAME} substitution for peer apiKey fields, consistent
with existing env macro support for model fields and global apiKeys.

- Add env macro substitution for peers.{name}.apiKey in LoadConfigFromReader
- Add tests for peer apiKey env substitution
- Update config.example.yaml to show env macro usage
Extend macro substitution to peer configuration fields:
- peers.{name}.apiKey supports both global macros and env macros
- peers.{name}.filters.stripParams supports both macro types
- peers.{name}.filters.setParams supports both macro types

Also renamed validateMetadataForUnknownMacros to validateNestedForUnknownMacros
for reuse across model metadata and peer filters validation.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 17, 2026

Warning

Rate limit exceeded

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

⌛ 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.

📥 Commits

Reviewing files that changed from the base of the PR and between b73f367 and 194a8bc.

📒 Files selected for processing (3)
  • config.example.yaml
  • proxy/config/config.go
  • proxy/config/config_test.go

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.

@mostlygeek mostlygeek merged commit 75fced5 into main Jan 17, 2026
3 checks passed
@mostlygeek mostlygeek deleted the use-claude-code-reviews branch January 17, 2026 07:11
rohitpaul pushed a commit to rohitpaul/llama-swap that referenced this pull request Mar 29, 2026
* config: support environment variable macros in peer apiKeys

Add ${env.VAR_NAME} substitution for peer apiKey fields, consistent
with existing env macro support for model fields and global apiKeys.

- Add env macro substitution for peers.{name}.apiKey in LoadConfigFromReader
- Add tests for peer apiKey env substitution
- Update config.example.yaml to show env macro usage

* config: support macros in peer apiKey and filters

Extend macro substitution to peer configuration fields:
- peers.{name}.apiKey supports both global macros and env macros
- peers.{name}.filters.stripParams supports both macro types
- peers.{name}.filters.setParams supports both macro types

Also renamed validateMetadataForUnknownMacros to validateNestedForUnknownMacros
for reuse across model metadata and peer filters validation.
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.

1 participant