docs: document COYOTE_CURRENT_MODEL tool env and web_search_coyote current-model preference

Dark-Alex-17 committed 2026-09-11 13:37:31 -06:00
1 parent 0cb6e69c49
commit 06bba0869e
4 files changed
+8 -1

No files matched your search

+5
@@ -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.
+1
@@ -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, <br>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). <br>When exceeded, the tool process is killed and a `tool_call_error` is returned to the model instead of hanging the session forever. <br>Set to `0` for unlimited. Default: `1800` (30 minutes). <br>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`). <br>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. <br>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:
+1
@@ -494,6 +494,7 @@ from normal agents:
| `LLM_AGENT_VAR_<NAME>` | 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 <agent> ...`), not the agent directory. This matches
+1 -1
@@ -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 <br>in English. Use it to answer user questions that require computation, detailed <br>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. <br>Use this when you need current information or feel a search could provide <br>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. <br>Use this when you need current information or feel a search could provide <br>a better answer. <br>Prefers the running session's model (`COYOTE_CURRENT_MODEL`) when it supports <br>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 <br>information or additional context. Use this when you need current <br>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 <br>information or additional context. Use this when you need current <br>information or feel a search could provide a better answer. | 🔴 |