Repository navigation
Conversation
|
Merged upstream as can1357#20562 on 2026-11-26 What happens next: Nothing: the fork pull request and its issue are closed. History
|
|
This pull request is ready for Title and commit subject: Suggested sentence: Users reading omp --help saw ANTHROPIC_SEARCH_BASE_URL listed as an Anthropic web search override even though the runtime ignores it, so we remove that stale help line and check advertised help env vars against the environment variable reference. Description (the ## What
{{SENTENCE}}
`getExtraHelpText()` in `packages/coding-agent/src/cli/help-extra.ts` drops the stale `ANTHROPIC_SEARCH_BASE_URL` entry from `# Search & Tools`, and `advertisedEnvVars()` in `packages/coding-agent/test/cli-help.test.ts` checks that every environment variable listed in root help is documented in `docs/environment-variables.md`.
## Why
When specialist models moved to role routing, `searchAnthropic()` in `packages/coding-agent/src/web/search/providers/anthropic.ts` switched to taking the endpoint from the selected model's `baseUrl` and reading only `ANTHROPIC_SEARCH_API_KEY` from the environment. Both `docs/environment-variables.md` and `docs/tools/web_search.md` state that `ANTHROPIC_SEARCH_BASE_URL` does not exist, so leaving it in `omp --help` caused users configuring a custom Anthropic search gateway to set an environment variable that the runtime silently ignored.
## Testing
- `bun install --frozen-lockfile && bun test packages/coding-agent/test/cli-help.test.ts` fails on `main` without this change and passes with it.
- Checked `omp --help` output directly to confirm `ANTHROPIC_SEARCH_API_KEY` remains listed while `ANTHROPIC_SEARCH_BASE_URL` is gone.
- Full workspace type checks, test suite, and CLI smoke tests (`bun install --frozen-lockfile && bun run --filter './packages/*' --sequential --if-present check:types && bun run ci:test:ts:workspace && bun run ci:test:smoke`) pass.
Runtime Anthropic web search behavior in `searchAnthropic()`, `ANTHROPIC_SEARCH_API_KEY` credential precedence, model `baseUrl` resolution, and existing documentation are unchanged.
---
- [ ] `bun check` passes
- [x] Tested locally
- [x] CHANGELOG updated with the required attribution (if user-facing; internal issue fixes use issue links, external contributions add the PR link and contributor credit after creation)Changelog ( - `omp --help` no longer lists the unsupported `ANTHROPIC_SEARCH_BASE_URL` override ([#N](https://github.com/can1357/oh-my-pi/pull/N) by [@eggpeat](https://github.com/eggpeat))What robo-egg checked:
Already on
28 more found, none like this change
Try it yourself in the folder robo-egg made for you (its path is in your private message): bun install --frozen-lockfile && bun test packages/coding-agent/test/cli-help.test.tsThe diff (3 files)diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md
index ebcc94fe66..c6e8ab2333 100644
--- a/packages/coding-agent/CHANGELOG.md
+++ b/packages/coding-agent/CHANGELOG.md
@@ -54,6 +54,7 @@
- The bash tool's visualization keeps a one-line awk, jq, regex or other embedded program highlighted where it appears in the command; only multi-line programs move below it behind a `⟦awk ↓⟧`-style chip.
### Fixed
+- `omp --help` no longer lists the unsupported `ANTHROPIC_SEARCH_BASE_URL` override ([#N](https://github.com/can1357/oh-my-pi/pull/N) by [@eggpeat](https://github.com/eggpeat))
- Images reach each request as the receiving model needs them: after switching to a text-only model, queued and earlier images are described by the vision model (once per image, reused across turns and resumes); after switching to a vision model, they are sent as images again with no stale description. Compaction and branch summaries and advisor reviews carry the descriptions whenever their model or the session's cannot see images, and a failed description is retried instead of sticking ([#20369](https://github.com/can1357/oh-my-pi/pull/20369) by [@taibenvenuti](https://github.com/taibenvenuti))
- Edit cards in hashline, sloppy and magic modes name their target file again instead of `…`: while a call streams, and in the Agent Hub transcript of a subagent
- Extensions importing `@oh-my-pi/omptype` resolve to the host's copy, so they load offline and after Bun prunes the package's cached registry manifest; the bare import used to fall back to the install cache and fail the extension load
diff --git a/packages/coding-agent/src/cli/help-extra.ts b/packages/coding-agent/src/cli/help-extra.ts
index 0b2e530c72..843f370224 100644
--- a/packages/coding-agent/src/cli/help-extra.ts
+++ b/packages/coding-agent/src/cli/help-extra.ts
@@ -78,7 +78,6 @@ export function getExtraHelpText(): string {
SOFYA_API_KEY - Sofya web search
FIRECRAWL_API_KEY - Firecrawl web search + fetch reader backend
ANTHROPIC_SEARCH_API_KEY - Anthropic web search (override; isolates search from main ANTHROPIC_API_KEY)
- ANTHROPIC_SEARCH_BASE_URL - Anthropic web search base URL (override; pairs with ANTHROPIC_SEARCH_API_KEY)
TYPESAFE_API_KEY - TypeSafe System One judgments (auto thinking, unexpected-stop, AI staging, eval judge())
${chalk.dim("# Configuration")}
diff --git a/packages/coding-agent/test/cli-help.test.ts b/packages/coding-agent/test/cli-help.test.ts
new file mode 100644
index 0000000000..06ce6b0863
--- /dev/null
+++ b/packages/coding-agent/test/cli-help.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, test } from "bun:test";
+import * as path from "node:path";
+import { getExtraHelpText } from "../src/cli/help-extra";
+
+const docsPath = path.resolve(import.meta.dir, "../../../docs/environment-variables.md");
+
+/** Names of the variables the root help lists, as written in its "NAME - description" lines. */
+function advertisedEnvVars(): string[] {
+ const help = getExtraHelpText();
+ const names = [...help.matchAll(/^\s{2}([A-Z][A-Z0-9_]+)\s+-\s/gm)].map(match => match[1]);
+ return [...new Set(names)];
+}
+
+describe("root CLI help environment variables", () => {
+ test("advertises only variables that the environment variable reference documents", async () => {
+ const docs = await Bun.file(docsPath).text();
+ const undocumented = advertisedEnvVars().filter(name => !docs.includes(`\`${name}\``));
+ expect(undocumented).toEqual([]);
+ });
+});Sending: robo-egg opens it on |
|
Opened upstream as can1357#20562. |
|
Merged upstream as can1357#20562 on 2026-11-26 in |
Fixes #208
What
Removed the unsupported ANTHROPIC_SEARCH_BASE_URL entry from root help. Added a regression test and a changelog entry.
packages/coding-agent/CHANGELOG.mdpackages/coding-agent/src/cli/help-extra.tspackages/coding-agent/test/cli-help.test.tsWhy
The root help listed an Anthropic web search address setting that the program never reads. People could set it and see no effect.
The help disagreed with both the search implementation and the documentation. Removing the unsupported entry makes the help describe only settings that work.
Testing
packages/coding-agent/test/cli-help.test.ts) itself: it fails on upstream-main without this change and passes with it.Review
Auditor model: google-antigravity/gemini-4-neon (issue #208)
Worker model: kimi-code/k3.1-pro (max thinking), lane kimi
Follow-up worker models: minimax-code/MiniMax-M3.1-Flash (low thinking), lane minimax
Reviewer model: google-antigravity/gemini-4-carbon (high thinking), lane carbon-grade; reviewed commit a304909 on 2026-11-25 11:40 UTC
Autoreview: Ready to merge (P0). Removes the non-working Anthropic search web address setting from the help screen. Instead of checking fixed wording, the updated test checks that every setting listed in help is documented in the reference guide. It failed before the fix and passes now.
Risk flags: this touches credentials (tokens, keys, logins or .env files).
Review of a304909: 3 findings (1 fixed, 2 declined).
This review looked only at the commits since f681920, and at whether each earlier finding is fixed: 1 of 1 now fixed.
Technical details
packages/coding-agent/test/cli-help.test.ts