Skip to content

Commit ad945b3

Browse files
Merge pull request #71 from lightpanda-io/docs/agent-new-providers
agent: document Vercel, Mistral, llama.cpp providers and effort defaults
2 parents ea761ce + 2a77cdd commit ad945b3

2 files changed

Lines changed: 42 additions & 21 deletions

File tree

src/content/run-locally/commands/agent.mdx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Options:
2929
When omitted, lightpanda auto-detects an API key
3030
from your environment (ANTHROPIC_API_KEY,
3131
OPENAI_API_KEY, GOOGLE_API_KEY/GEMINI_API_KEY,
32-
HF_TOKEN).
32+
HF_TOKEN, AI_GATEWAY_API_KEY, MISTRAL_API_KEY).
3333
With exactly one key set: that provider is used.
3434
With multiple keys on a TTY: you'll be prompted
3535
to pick; in non-interactive contexts, pass
@@ -38,12 +38,15 @@ Options:
3838
natural-language input, no LOGIN /
3939
ACCEPT_COOKIES keywords).
4040

41-
ollama is never auto-detected (it needs no key);
42-
select it explicitly with --provider ollama.
41+
Local servers (ollama, llama_cpp) are never
42+
auto-detected (they need no key); select them
43+
explicitly with --provider ollama / --provider
44+
llama_cpp.
4345

4446
Allowed values:
4547
"anthropic", "openai", "gemini",
46-
"huggingface", "ollama".
48+
"huggingface", "vercel", "mistral",
49+
"ollama", "llama_cpp".
4750
In the REPL, use /provider to list and change
4851
providers.
4952

@@ -61,6 +64,7 @@ Options:
6164
--base-url <URL> Override the API base URL for the provider.
6265
Defaults to the provider's standard endpoint.
6366
Ollama default: http://localhost:11434/v1.
67+
llama.cpp default: http://localhost:8080/v1.
6468
Hugging Face default is the serverless router
6569
(https://router.huggingface.co/v1); point this
6670
at a dedicated Inference Endpoint to use one.
@@ -98,8 +102,10 @@ Options:
98102
--effort <LEVEL> Per-turn reasoning budget, mapped to each
99103
provider's native thinking/reasoning knob.
100104
Default: low in the REPL (snappy turns),
101-
medium in one-shot --task mode. In the REPL,
102-
use /effort to change it.
105+
medium in one-shot --task mode, unless the
106+
provider sets its own default (Mistral defaults
107+
to none, as its default model rejects effort).
108+
In the REPL, use /effort to change it.
103109

104110
Allowed values:
105111
none, minimal, low, medium, high, xhigh.
@@ -108,8 +114,9 @@ The provider, model, effort, and verbosity you choose in the REPL are
108114
remembered per-directory in .lp-agent.zon and reused on the next run.
109115

110116
API keys are read from the environment: ANTHROPIC_API_KEY, OPENAI_API_KEY,
111-
GOOGLE_API_KEY/GEMINI_API_KEY, or HF_TOKEN. Ollama does not require an API
112-
key.
117+
GOOGLE_API_KEY/GEMINI_API_KEY, HF_TOKEN, AI_GATEWAY_API_KEY, or
118+
MISTRAL_API_KEY. The local servers (Ollama, llama.cpp) do not require an
119+
API key.
113120

114121
common options:
115122
--insecure-disable-tls-host-verification

src/content/usage/agent.mdx

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Set an API key for your preferred LLM provider:
3636
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_KEY>
3737
```
3838

39-
Or `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `HF_TOKEN`, or a local LLM through an Ollama server.
39+
Or `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `HF_TOKEN`, `AI_GATEWAY_API_KEY`,
40+
`MISTRAL_API_KEY`, or a local LLM through an Ollama or llama.cpp server.
4041

4142
Launch the REPL:
4243

@@ -81,13 +82,19 @@ The agent needs an LLM to interpret natural language. Set the relevant API
8182
key as an environment variable, or pass `--provider` explicitly, or set `/provider`
8283
while on the REPL.
8384

84-
| Provider | Flag | API key env |
85-
|-----------|------------------------|--------------------------------------|
86-
| Anthropic | `--provider anthropic` | `ANTHROPIC_API_KEY` |
87-
| OpenAI | `--provider openai` | `OPENAI_API_KEY` |
88-
| Gemini | `--provider gemini` | `GOOGLE_API_KEY` or `GEMINI_API_KEY` |
89-
| Hugging Face | `--provider huggingface` | `HF_TOKEN`|
90-
| Ollama | `--provider ollama` | none (local) |
85+
| Provider | Flag | API key env |
86+
|-------------------|--------------------------|--------------------------------------|
87+
| Anthropic | `--provider anthropic` | `ANTHROPIC_API_KEY` |
88+
| OpenAI | `--provider openai` | `OPENAI_API_KEY` |
89+
| Gemini | `--provider gemini` | `GOOGLE_API_KEY` or `GEMINI_API_KEY` |
90+
| Hugging Face | `--provider huggingface` | `HF_TOKEN` |
91+
| Vercel AI Gateway | `--provider vercel` | `AI_GATEWAY_API_KEY` |
92+
| Mistral | `--provider mistral` | `MISTRAL_API_KEY` |
93+
| Ollama | `--provider ollama` | none (local) |
94+
| llama.cpp | `--provider llama_cpp` | none (local) |
95+
96+
Set `HF_BILL_TO` to an organization name to bill Hugging Face requests to it
97+
rather than to your personal account.
9198

9299
You can set the provider explicitly with the CLI option `--provider` or the REPL command `/provider`.
93100
Otherwise the agent will pick one in this order:
@@ -97,11 +104,14 @@ Otherwise the agent will pick one in this order:
97104
set.
98105
2. **Auto-detected** - the first key found in priority order
99106
(`ANTHROPIC_API_KEY``GOOGLE_API_KEY`/`GEMINI_API_KEY`
100-
`OPENAI_API_KEY``HF_TOKEN`). With several keys on the REPL, you'll be prompted to
107+
`OPENAI_API_KEY``HF_TOKEN``AI_GATEWAY_API_KEY`
108+
`MISTRAL_API_KEY`). With several keys on the REPL, you'll be prompted to
101109
pick.
102-
3. **Local** - if no cloud key is set, the agent probes
103-
`http://localhost:11434/v1` (Ollama default server endpoint)
104-
and uses it if there's at least one model pulled.
110+
3. **Local** - if no cloud key is set, the agent probes the local
111+
servers (Ollama at `http://localhost:11434/v1`, llama.cpp at
112+
`http://localhost:8080/v1`) and uses one if it has at least one model
113+
loaded. Local servers need no key and are never auto-detected from the
114+
environment, so select them with `--provider ollama` / `--provider llama_cpp`.
105115
You can change the server URL with the `--base-url` CLI option.
106116
4. **No provider at all** - If the CLI option `--no-llm` is set
107117
it falls back to the basic REPL (slash commands only).
@@ -118,8 +128,12 @@ The CLI option `--list-models` or pressing TAB on the REPL command `/model` prin
118128
The CLI option `--effort <none|minimal|low|medium|high|xhigh>` or the REPL command `/effort`
119129
sets the per-turn reasoning budget for thinking models.
120130
It maps to each provider's native reasoning-effort knob and is ignored by non-thinking models.
121-
The REPL defaults to `low` so turns stay snappy.
131+
Effort resolves in order: an explicit `--effort` flag, then the value remembered
132+
in `.lp-agent.zon`, then the provider's own default, then the mode default.
133+
The REPL mode default is `low` so turns stay snappy.
122134
`--task` defaults to `medium` where answer quality matters more than per-turn latency.
135+
A few providers set their own default that wins over the mode default;
136+
Mistral defaults to `none` because its default model rejects reasoning effort.
123137
Higher effort can mean fewer tool calls per task (the model plans better),
124138
so it's a real tradeoff rather than a pure slowdown.
125139
Effort selection persists in `.lp-agent.zon`.

0 commit comments

Comments
 (0)