docs: documented ANTHROPIC_SEARCH_API_KEY and ANTHROPIC_SEARCH_BASE_URL

- Expanded the existing entries in docs/environment-variables.md so the override-semantics ('search-only, isolates from main ANTHROPIC_API_KEY / ANTHROPIC_BASE_URL / FOUNDRY_BASE_URL') are spelled out, and added a usage note for enterprise-gateway split routing.
- Surfaced the search-only env vars (ANTHROPIC_SEARCH_API_KEY / ANTHROPIC_SEARCH_BASE_URL / ANTHROPIC_SEARCH_MODEL) in the Anthropic provider section of docs/tools/web_search.md, where users were already looking.
- Added ANTHROPIC_SEARCH_BASE_URL alongside ANTHROPIC_SEARCH_API_KEY in 'omp --help' so the pair shows up together in the CLI env-var summary.

Fixes #1694
This commit is contained in:
roboomp
2026-06-02 07:49:59 +00:00
parent dbdc77697c
commit 5b1e5a5c4a
4 changed files with 16 additions and 8 deletions
+5 -1
View File
@@ -121,7 +121,11 @@ Streaming: none. `WebSearchTool.execute()` forwards its `AbortSignal` into `exec
- `limit` / `num_search_results`: `params.numSearchResults ?? params.limit`, clamped to `1..20`, default `10`.
- Output: `sources`, `requestId`.
- **Anthropic** — `packages/coding-agent/src/web/search/providers/anthropic.ts`
- Availability: `findAnthropicAuth()` from `@oh-my-pi/pi-ai`.
- Availability: `ANTHROPIC_SEARCH_API_KEY` env var, otherwise `findAnthropicAuth()` from `@oh-my-pi/pi-ai` (stored Anthropic OAuth/API-key credentials).
- Env overrides specific to search (do not affect chat completions):
- `ANTHROPIC_SEARCH_API_KEY` — highest-priority search auth; overrides `ANTHROPIC_API_KEY` / OAuth / `ANTHROPIC_FOUNDRY_API_KEY` for the search call only.
- `ANTHROPIC_SEARCH_BASE_URL` — overrides `ANTHROPIC_BASE_URL` (and `FOUNDRY_BASE_URL` in Foundry mode); defaults to `https://api.anthropic.com`.
- `ANTHROPIC_SEARCH_MODEL` — search model; defaults to `claude-haiku-4-5`.
- Querying: Claude Messages API with web-search tool enabled.
- `max_tokens` and `temperature` pass through.
- `limit` and `num_search_results` are collapsed together before dispatch: `num_results = params.numSearchResults ?? params.limit`.