docs(config): teach canonical GOMODEL_-prefixed env vars everywhere#542
docs(config): teach canonical GOMODEL_-prefixed env vars everywhere#542SantiagoDePolonia wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (38)
📝 WalkthroughWalkthroughThe pull request standardizes GoModel configuration examples and generated deployment settings on ChangesEnvironment naming contract
Runtime and deployment wiring
Feature and provider documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@helm/templates/deployment.yaml`:
- Around line 74-94: Map GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED in the deployment
template’s container env list alongside the existing Redis configuration
variables, using the same configMapKeyRef pattern and fullname reference. Ensure
it reads the identically named key from the Redis-configured ConfigMap so the
pod receives the setting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e2eb39d3-7c6b-47ea-8f28-cce7551c6896
📒 Files selected for processing (38)
.env.templateCLAUDE.mdMakefileREADME.mdconfig/config.example.yamldocker-compose.yamldocs/advanced/admin-endpoints.mdxdocs/advanced/api-endpoints.mdxdocs/advanced/audio-api.mdxdocs/advanced/cli.mdxdocs/advanced/config-yaml.mdxdocs/advanced/configuration.mdxdocs/advanced/guardrails.mdxdocs/advanced/resilience.mdxdocs/advanced/usage-api.mdxdocs/dev/2026-07-17_env-prefix-migration.mddocs/features/budgets.mdxdocs/features/cache.mdxdocs/features/cost-tracking.mdxdocs/features/failover.mdxdocs/features/labelling.mdxdocs/features/mcp-gateway.mdxdocs/features/passthrough-api.mdxdocs/features/rate-limits.mdxdocs/features/user-path.mdxdocs/features/virtual-models.mdxdocs/getting-started/quickstart.mdxdocs/guides/prometheus-metrics.mdxdocs/providers/anthropic.mdxdocs/providers/bailian.mdxdocs/providers/bedrock.mdxdocs/providers/gemini.mdxdocs/providers/opencode-go.mdxdocs/providers/oracle.mdxdocs/providers/overview.mdxhelm/templates/_helpers.tplhelm/templates/configmap.yamlhelm/templates/deployment.yaml
| - name: GOMODEL_REDIS_KEY_MODELS | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: {{ include "gomodel.fullname" . }} | ||
| key: REDIS_KEY_MODELS | ||
| - name: REDIS_KEY_RESPONSES | ||
| key: GOMODEL_REDIS_KEY_MODELS | ||
| - name: GOMODEL_REDIS_KEY_RESPONSES | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: {{ include "gomodel.fullname" . }} | ||
| key: REDIS_KEY_RESPONSES | ||
| - name: REDIS_TTL_MODELS | ||
| key: GOMODEL_REDIS_KEY_RESPONSES | ||
| - name: GOMODEL_REDIS_TTL_MODELS | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: {{ include "gomodel.fullname" . }} | ||
| key: REDIS_TTL_MODELS | ||
| - name: REDIS_TTL_RESPONSES | ||
| key: GOMODEL_REDIS_TTL_MODELS | ||
| - name: GOMODEL_REDIS_TTL_RESPONSES | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: {{ include "gomodel.fullname" . }} | ||
| key: REDIS_TTL_RESPONSES | ||
| key: GOMODEL_REDIS_TTL_RESPONSES | ||
| {{- end }} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Map GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED to the container environment.
The GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED key is defined in configmap.yaml when Redis is configured, but it is not mapped into the container's environment in deployment.yaml. Since envFrom is not used, this variable will be ignored by the pod, causing the exact-match cache to remain disabled despite Redis being configured.
Please explicitly map it under the env list.
🐛 Proposed fix to map the variable
- name: GOMODEL_REDIS_TTL_RESPONSES
valueFrom:
configMapKeyRef:
name: {{ include "gomodel.fullname" . }}
key: GOMODEL_REDIS_TTL_RESPONSES
+ - name: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED
+ valueFrom:
+ configMapKeyRef:
+ name: {{ include "gomodel.fullname" . }}
+ key: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED
{{- end }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: GOMODEL_REDIS_KEY_MODELS | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: REDIS_KEY_MODELS | |
| - name: REDIS_KEY_RESPONSES | |
| key: GOMODEL_REDIS_KEY_MODELS | |
| - name: GOMODEL_REDIS_KEY_RESPONSES | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: REDIS_KEY_RESPONSES | |
| - name: REDIS_TTL_MODELS | |
| key: GOMODEL_REDIS_KEY_RESPONSES | |
| - name: GOMODEL_REDIS_TTL_MODELS | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: REDIS_TTL_MODELS | |
| - name: REDIS_TTL_RESPONSES | |
| key: GOMODEL_REDIS_TTL_MODELS | |
| - name: GOMODEL_REDIS_TTL_RESPONSES | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: REDIS_TTL_RESPONSES | |
| key: GOMODEL_REDIS_TTL_RESPONSES | |
| {{- end }} | |
| - name: GOMODEL_REDIS_KEY_MODELS | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: GOMODEL_REDIS_KEY_MODELS | |
| - name: GOMODEL_REDIS_KEY_RESPONSES | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: GOMODEL_REDIS_KEY_RESPONSES | |
| - name: GOMODEL_REDIS_TTL_MODELS | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: GOMODEL_REDIS_TTL_MODELS | |
| - name: GOMODEL_REDIS_TTL_RESPONSES | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: GOMODEL_REDIS_TTL_RESPONSES | |
| - name: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED | |
| valueFrom: | |
| configMapKeyRef: | |
| name: {{ include "gomodel.fullname" . }} | |
| key: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED | |
| {{- end }} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@helm/templates/deployment.yaml` around lines 74 - 94, Map
GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED in the deployment template’s container env
list alongside the existing Redis configuration variables, using the same
configMapKeyRef pattern and fullname reference. Ensure it reads the identically
named key from the Redis-configured ConfigMap so the pod receives the setting.
| - `GOMODEL_DASHBOARD_LIVE_LOGS_BUFFER_SIZE` (10000): effective size is capped at `GOMODEL_DASHBOARD_LIVE_LOGS_REPLAY_LIMIT + 1` (older events can never be replayed); lower it below the replay limit only to shrink memory at the cost of more replay resets. Buffered events are compact previews — request/response bodies are never retained in the buffer (connected dashboards get them live; history hydrates from persisted audit entries). | ||
| - `GOMODEL_DASHBOARD_LIVE_LOGS_REPLAY_LIMIT` (1000): increase when clients commonly reconnect after long gaps (30+ seconds at high traffic); decrease to reduce replay latency and memory. Also bounds the live log buffer. | ||
| - `GOMODEL_DASHBOARD_LIVE_LOGS_HEARTBEAT_SECONDS` (15): decrease to 5-10s when proxies need frequent liveness checks; increase to reduce idle network chatter. | ||
| - **Cache:** `GOMODEL_CACHE_REFRESH_INTERVAL` (3600s: full model re-discovery; also drives dashboard provider health "Last checked"), `GOMODEL_PROVIDER_RECHECK_INTERVAL` (60s: fast re-probe of only the providers whose last refresh failed, 0 disables), `REDIS_URL`, `GOMODEL_REDIS_KEY_MODELS`, `GOMODEL_REDIS_TTL_MODELS`. A provider whose refresh fails keeps its previous inventory marked stale: direct requests still route to it (honest 502/503), virtual-model load balancing skips it (`ModelAvailable`), and the dashboard shows Degraded. Exact response cache uses `cache.response.simple` in `config.yaml` (optional `enabled`); `GOMODEL_REDIS_KEY_RESPONSES`, `GOMODEL_REDIS_TTL_RESPONSES`, and `REDIS_URL` apply only when that block exists or when `GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED=true`. Semantic response cache uses `cache.response.semantic` (optional `enabled`); when enabled, `embedder.provider` must name a key in the top-level `providers` map (no default embedder). At runtime that key is resolved against the same env-merged, credential-filtered provider set as routing (not YAML-only), so env-only credentials apply. `vector_store.type` must be set explicitly to one of `qdrant`, `pgvector`, `pinecone`, `weaviate` (each has its own nested config and `SEMANTIC_CACHE_*` env vars). Tuning via `SEMANTIC_CACHE_*` applies when the semantic block exists or `GOMODEL_SEMANTIC_CACHE_ENABLED=true`. |
There was a problem hiding this comment.
Prefix semantic cache variables
This changed reference still documents the semantic-cache knobs as bare SEMANTIC_CACHE_*, even though the new canonical naming note says GoModel-defined variables must use GOMODEL_ unless they are PORT/REDIS_URL or provider-family names. Users following this line will keep copying deprecated names instead of the intended GOMODEL_SEMANTIC_CACHE_* examples.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
134ca28 to
2238c1f
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
helm/templates/deployment.yaml (1)
74-94: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMap
GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLEDto the container environment.The
GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLEDkey is defined inconfigmap.yamlwhen Redis is configured, but it is not mapped into the container's environment indeployment.yaml. SinceenvFromis not used, this variable will be ignored by the pod, causing the exact-match cache to remain disabled despite Redis being configured.Please explicitly map it under the
envlist.🐛 Proposed fix to map the variable
- name: GOMODEL_REDIS_TTL_RESPONSES valueFrom: configMapKeyRef: name: {{ include "gomodel.fullname" . }} key: GOMODEL_REDIS_TTL_RESPONSES + - name: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED + valueFrom: + configMapKeyRef: + name: {{ include "gomodel.fullname" . }} + key: GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED {{- end }}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@helm/templates/deployment.yaml` around lines 74 - 94, Add GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED to the deployment template’s container env list, alongside the existing Redis configuration variables, using the same configMapKeyRef pattern and the matching key from configmap.yaml. Keep it within the Redis-configured conditional block so the pod receives the setting when Redis is enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@helm/templates/deployment.yaml`:
- Around line 74-94: Add GOMODEL_RESPONSE_CACHE_SIMPLE_ENABLED to the deployment
template’s container env list, alongside the existing Redis configuration
variables, using the same configMapKeyRef pattern and the matching key from
configmap.yaml. Keep it within the Redis-configured conditional block so the pod
receives the setting when Redis is enabled.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2f69a967-e9b3-4063-8c2e-391f289aa027
📒 Files selected for processing (38)
.env.templateCLAUDE.mdMakefileREADME.mdconfig/config.example.yamldocker-compose.yamldocs/advanced/admin-endpoints.mdxdocs/advanced/api-endpoints.mdxdocs/advanced/audio-api.mdxdocs/advanced/cli.mdxdocs/advanced/config-yaml.mdxdocs/advanced/configuration.mdxdocs/advanced/guardrails.mdxdocs/advanced/resilience.mdxdocs/advanced/usage-api.mdxdocs/dev/2026-07-17_env-prefix-migration.mddocs/features/budgets.mdxdocs/features/cache.mdxdocs/features/cost-tracking.mdxdocs/features/failover.mdxdocs/features/labelling.mdxdocs/features/mcp-gateway.mdxdocs/features/passthrough-api.mdxdocs/features/rate-limits.mdxdocs/features/user-path.mdxdocs/features/virtual-models.mdxdocs/getting-started/quickstart.mdxdocs/guides/prometheus-metrics.mdxdocs/providers/anthropic.mdxdocs/providers/bailian.mdxdocs/providers/bedrock.mdxdocs/providers/gemini.mdxdocs/providers/opencode-go.mdxdocs/providers/oracle.mdxdocs/providers/overview.mdxhelm/templates/_helpers.tplhelm/templates/configmap.yamlhelm/templates/deployment.yaml
Rename every GoModel-defined environment variable to its canonical GOMODEL_ spelling across the documentation surface: the docs site, README, .env.template, config.example.yaml, helm chart, docker-compose, and Makefile. Exempt names (PORT, REDIS_URL, the provider family) and dated material under docs/dev, docs/adr, and the benchmark directories are untouched. Adds a naming note to the configuration reference page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2238c1f to
d764c7f
Compare
What
Renames every GoModel-defined environment variable to its canonical
GOMODEL_spelling across the documentation surface — the follow-up named in #541's "Not in this PR" section. Stacked on #541 (the resolution mechanism); merge that first and this retargets tomainautomatically.Surface covered:
docs/— the configuration reference, feature pages, provider pages, and guides. Adds a naming note (canonical prefix, deprecation, the two permanently-bare groups) toadvanced/configuration.mdx..env.templatebody,config/config.example.yamlcomments.What stays bare (deliberately)
PORT,REDIS_URL— PaaS-injected.OPENAI_API_KEY,<PROVIDER>_BASE_URL,<PROVIDER>_MODELS, … — vendor namespace, drop-in compatibility.docs/dev/,docs/adr/, and the benchmark directories keeps the spellings it was written with (historical records).How it was done
Allowlist-based script (exact names extracted from the code's
env:tags + named reads + the four dynamic families), not a blind find-and-replace — the exempt rules make blind replacement unsafe. Verified zero remaining bare mentions of renamed variables on the covered surface.Verification
mint validate(docs build) andmake test-race.config.example.yaml; no Go code changes.🤖 Generated with Claude Code
Summary by CodeRabbit
Configuration
GOMODEL_prefix across Docker, Helm, Makefile, and provided examples.GOMODEL_values take precedence when both are set.Documentation
GOMODEL_names.