From 0123a458c5c1c415230dc8a09f099122dd2b372d Mon Sep 17 00:00:00 2001 From: "inference-gateway-maintainer[bot]" <246577062+inference-gateway-maintainer[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:34:26 +0000 Subject: [PATCH 1/2] docs: fix dead INFER_AGENT_SYSTEM_PROMPT env vars in configuration-reference.md --- cmd/config.go | 16 ++++++++++++++++ docs/configuration-reference.md | 15 +++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cmd/config.go b/cmd/config.go index f2c17271..5add510b 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -435,6 +435,7 @@ func loadConfigFromViper() (*config.Config, error) { } cfg.Prompts = *prompts applyPromptsEnvOverrides(cfg) + warnDeadPromptEnvVars() remindersCfg, err := resolveRemindersConfig() if err != nil { @@ -547,6 +548,21 @@ func applyPromptsEnvOverrides(cfg *config.Config) { } } +// warnDeadPromptEnvVars logs a warning when a known-dead env var (renamed +// in v0.105.0) is set, so consumers following stale docs get a visible +// signal instead of silent ignore. +func warnDeadPromptEnvVars() { + deadVars := []string{ + "INFER_AGENT_SYSTEM_PROMPT", + "INFER_AGENT_SYSTEM_PROMPT_PLAN", + } + for _, name := range deadVars { + if _, ok := os.LookupEnv(name); ok { + logger.Warn("environment variable %s is no longer supported (renamed in v0.105.0); see INFER_PROMPTS_AGENT_SYSTEM_PROMPT / INFER_PROMPTS_AGENT_SYSTEM_PROMPT_PLAN in docs/configuration-reference.md", "var", name) + } + } +} + // applyKeybindingEnvOverrides walks INFER_CHAT_KEYBINDINGS_BINDINGS_* // environment variables and applies them directly to the in-memory // keybindings config. Run AFTER loading keybindings.yaml so env vars win. diff --git a/docs/configuration-reference.md b/docs/configuration-reference.md index 69c35652..ad6d7e89 100644 --- a/docs/configuration-reference.md +++ b/docs/configuration-reference.md @@ -630,9 +630,20 @@ and replacing dots (`.`) with underscores (`_`), then prefixing with `INFER_`. ### Agent Configuration - `INFER_AGENT_MODEL`: Default model for agent operations (e.g., `deepseek/deepseek-v4-pro`) -- `INFER_AGENT_SYSTEM_PROMPT`: Custom system prompt for agent -- `INFER_AGENT_SYSTEM_PROMPT_PLAN`: Custom system prompt for plan mode +- `INFER_PROMPTS_AGENT_SYSTEM_PROMPT`: Custom system prompt for agent +- `INFER_PROMPTS_AGENT_SYSTEM_PROMPT_PLAN`: Custom system prompt for plan mode +- `INFER_PROMPTS_AGENT_SYSTEM_PROMPT_REMOTE`: Custom system prompt for remote agent +- `INFER_PROMPTS_AGENT_SYSTEM_PROMPT_HEARTBEAT`: Custom system prompt for heartbeat +- `INFER_PROMPTS_AGENT_SYSTEM_PROMPT_CLAUDE_CODE`: Custom system prompt for Claude Code mode +- `INFER_PROMPTS_AGENT_CUSTOM_INSTRUCTIONS`: Custom instructions for agent - `INFER_AGENT_VERBOSE_TOOLS`: Enable verbose tool output (default: `false`) + +> **Migration note (v0.105.0+):** The old `INFER_AGENT_SYSTEM_PROMPT` and +> `INFER_AGENT_SYSTEM_PROMPT_PLAN` env vars were renamed to +> `INFER_PROMPTS_AGENT_SYSTEM_PROMPT` and `INFER_PROMPTS_AGENT_SYSTEM_PROMPT_PLAN` +> respectively when agent prompts moved under the `prompts.agent.*` config tree. +> The old names are silently ignored — if you are migrating an existing +> configuration, update your env vars to the new names above. - `INFER_AGENT_MAX_TURNS`: Maximum agent turns (default: `100`) - `INFER_AGENT_MAX_TOKENS`: Maximum tokens per response (default: `8192`) - `INFER_AGENT_MAX_CONCURRENT_TOOLS`: Maximum concurrent tool executions (default: `5`) From ecf2ea493540a82d410e1d93f67b5559a2e40fea Mon Sep 17 00:00:00 2001 From: "inference-gateway-maintainer[bot]" <246577062+inference-gateway-maintainer[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 21:20:20 +0000 Subject: [PATCH 2/2] fix(config): remove format specifier from logger.Warn to satisfy loggercheck linter --- cmd/config.go | 2 +- docs/configuration-reference.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/config.go b/cmd/config.go index 5add510b..e25ff103 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -558,7 +558,7 @@ func warnDeadPromptEnvVars() { } for _, name := range deadVars { if _, ok := os.LookupEnv(name); ok { - logger.Warn("environment variable %s is no longer supported (renamed in v0.105.0); see INFER_PROMPTS_AGENT_SYSTEM_PROMPT / INFER_PROMPTS_AGENT_SYSTEM_PROMPT_PLAN in docs/configuration-reference.md", "var", name) + logger.Warn("environment variable is no longer supported (renamed in v0.105.0); see INFER_PROMPTS_AGENT_SYSTEM_PROMPT / INFER_PROMPTS_AGENT_SYSTEM_PROMPT_PLAN in docs/configuration-reference.md", "var", name) } } } diff --git a/docs/configuration-reference.md b/docs/configuration-reference.md index ad6d7e89..c9ebb922 100644 --- a/docs/configuration-reference.md +++ b/docs/configuration-reference.md @@ -644,6 +644,7 @@ and replacing dots (`.`) with underscores (`_`), then prefixing with `INFER_`. > respectively when agent prompts moved under the `prompts.agent.*` config tree. > The old names are silently ignored — if you are migrating an existing > configuration, update your env vars to the new names above. + - `INFER_AGENT_MAX_TURNS`: Maximum agent turns (default: `100`) - `INFER_AGENT_MAX_TOKENS`: Maximum tokens per response (default: `8192`) - `INFER_AGENT_MAX_CONCURRENT_TOOLS`: Maximum concurrent tool executions (default: `5`)