diff --git a/Custom-Bash-Tools.md b/Custom-Bash-Tools.md
index 37cb365..ef204e5 100644
--- a/Custom-Bash-Tools.md
+++ b/Custom-Bash-Tools.md
@@ -37,6 +37,11 @@ A few things to know about how Coyote runs your tool's subprocess:
environment variable (the environment variable takes precedence; default: `1800` seconds; `0` = unlimited). If the
tool exceeds it, the process is killed and a `tool_call_error` is returned to the model, and the session keeps
going. See [Environment Variables](Environment-Variables).
+* **`COYOTE_CURRENT_MODEL` identifies the session's active model.** Every tool subprocess (foreground tool calls and
+ `job__start` background jobs alike) receives the running session's model in `client:name` form (e.g.
+ `claude:claude-opus-5`). Tools can use it to adapt behavior to the model driving the session — the bundled
+ `web_search_coyote.sh` uses it to run native web search on the current model when supported. Read it defensively
+ (`"${COYOTE_CURRENT_MODEL:-}"`); agent-declared `variables:` envs with the same name take precedence.
The following section explains how you can add parameters to your bash functions and how to test out your scripts.
diff --git a/Environment-Variables.md b/Environment-Variables.md
index 92fe38b..9b40d25 100644
--- a/Environment-Variables.md
+++ b/Environment-Variables.md
@@ -61,6 +61,7 @@ The following environment variables are available for clients in Coyote:
| `COYOTE_PATCH_{client}_CHAT_COMPLETIONS` | Patch chat completion requests to models on the corresponding client; Can modify the URL, body,
or headers. |
| `COYOTE_SHELL` | Specify the shell that Coyote should be using when executing commands |
| `COYOTE_TOOL_TIMEOUT` | Wall-clock cap in seconds for any single tool-call subprocess (built-in and custom tools alike).
When exceeded, the tool process is killed and a `tool_call_error` is returned to the model instead of hanging the session forever.
Set to `0` for unlimited. Default: `1800` (30 minutes).
Counterpart of the `tool_timeout` config key; the environment variable takes precedence. |
+| `COYOTE_CURRENT_MODEL` | Set **by** Coyote (not read by it) in the environment of every tool-call subprocess: the running session's active model in `client:name` form (e.g. `claude:claude-opus-5`).
Lets tools adapt to the model driving the session — e.g. `web_search_coyote.sh` prefers the current model for native web search when it supports it, falling back to `WEB_SEARCH_MODEL` otherwise.
Agent-declared `variables:` envs with the same name take precedence. |
# Files and Directory Related Variables
You can also customize the files and directories that Coyote loads its configuration files from:
diff --git a/Graph-Agents.md b/Graph-Agents.md
index 6331ec1..d148748 100644
--- a/Graph-Agents.md
+++ b/Graph-Agents.md
@@ -494,6 +494,7 @@ from normal agents:
| `LLM_AGENT_VAR_` | One per declared `variables:` entry; uppercased name |
| `PATH` | Coyote's functions bin dir prepended to the inherited `PATH` |
| `CLICOLOR_FORCE`, `FORCE_COLOR` | Both set to `1` so child tools emit ANSI colors |
+| `COYOTE_CURRENT_MODEL` | The session's active model in `client:name` form |
The script's **working directory** is the coyote invocation directory (where
the user ran `coyote -a ...`), not the agent directory. This matches
diff --git a/Tools.md b/Tools.md
index 4a9ab25..b10291f 100644
--- a/Tools.md
+++ b/Tools.md
@@ -42,7 +42,7 @@ be enabled/disabled can be found in the [Configuration](#configuration) section
| [`search_wolframalpha.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/search_wolframalpha.sh) | Get an answer to a question using Wolfram Alpha. The input query should be
in English. Use it to answer user questions that require computation, detailed
facts, data analysis, or complex queries. | 🔴 |
| [`send_mail.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/send_mail.sh) | Send an email. | 🔴 |
| [`send_twilio.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/send_twilio.sh) | Send SMS or Twilio Messaging Channels messages using the Twilio API. | 🔴 |
-| [`web_search_coyote.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/web_search_coyote.sh) | Perform a web search to get up-to-date information or additional context.
Use this when you need current information or feel a search could provide
a better answer. | 🟢 |
+| [`web_search_coyote.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/web_search_coyote.sh) | Perform a web search to get up-to-date information or additional context.
Use this when you need current information or feel a search could provide
a better answer.
Prefers the running session's model (`COYOTE_CURRENT_MODEL`) when it supports
native web search, falling back to `WEB_SEARCH_MODEL` (set `WEB_SEARCH_USE_CURRENT_MODEL=false` to always use the fallback). | 🟢 |
| [`web_search_perplexity.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/web_search_perplexity.sh) | Perform a web search using the Perplexity API to get up-to-date
information or additional context. Use this when you need current
information or feel a search could provide a better answer. | 🔴 |
| [`web_search_tavily.sh`](https://github.com/Dark-Alex-17/coyote/blob/main/assets/functions/tools/web_search_tavily.sh) | Perform a web search using the Tavily API to get up-to-date
information or additional context. Use this when you need current
information or feel a search could provide a better answer. | 🔴 |