Reconcile config/docs for TOML-only rate-limit fields and legacy JSON stdin aliases#6916
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix misleading json tags on TOML-only fields in ServerConfig
Reconcile config/docs for TOML-only rate-limit fields and legacy JSON stdin aliases
Jun 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns configuration metadata and operator/agent documentation with the gateway’s actual behavior around TOML-only rate-limit fields and legacy JSON stdin timeout aliases, reducing drift flagged by nightly docs reconciliation.
Changes:
- Mark
ServerConfigrate-limit fields as TOML-only by excluding them from JSON tags (json:"-"). - Add a unit test asserting the JSON tag exclusion contract for those rate-limit fields.
- Update README/AGENTS docs to mention legacy JSON stdin timeout aliases and add
TAVILY_API_KEYto the environment variable list.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents legacy JSON stdin timeout aliases for backward compatibility. |
| internal/config/rate_limit_config_test.go | Adds a reflection-based test asserting rate-limit fields are excluded from JSON tags. |
| internal/config/config_core.go | Updates rate-limit struct tags to json:"-" to reflect TOML-only support. |
| AGENTS.md | Documents legacy JSON stdin timeout aliases and adds TAVILY_API_KEY to env var list. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
Nightly docs reconciliation flagged three drift points: TOML-only rate-limit fields in
ServerConfigstill advertised JSON tags,TAVILY_API_KEYmissing fromAGENTS.md, and undocumented legacy JSON stdin timeout aliases. This PR aligns implementation metadata and operator-facing docs with current behavior.Config metadata: make TOML-only intent explicit
ServerConfig.RateLimitThresholdandServerConfig.RateLimitCooldowntojson:"-"ininternal/config/config_core.go.Behavior guardrail: assert tag contract
internal/config/rate_limit_config_test.goto assert both rate-limit fields are excluded from JSON tags.Docs: close gaps in agent/operator references
TAVILY_API_KEYto the environment variable list inAGENTS.md.connect_timeoutandtool_timeout(preferred:connectTimeout/toolTimeout) in:README.mdAGENTS.md