List usable model ids when PI_MODEL points at a provider without credentials

Claude-Session: https://claude.ai/code/session_01JtuZTCMW9TyogEmBgGf8JT
This commit is contained in:
EugeneTes
2026-09-06 18:38:43 +02:00
parent 59b11eda14
commit 0eed2fa36d
6 changed files with 71 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ No quotes, no spaces around `=`.
| --- | --- |
| `OPENAI_API_KEY=` | Enables voice notes. Paste an OpenAI API key and voice messages get transcribed before the assistant sees them. Without it, voice notes get a polite "not configured" reply. |
| `STT_MODEL=gpt-4o-transcribe` | The OpenAI transcription model. Fine as is. |
| `PI_MODEL=` | Forces a model, for example `anthropic/claude-opus-4-8`. Empty means Pi's own default from `~/.pi/agent/settings.json`. |
| `PI_MODEL=` | Forces a model. Empty means the first model Pi has credentials for; with the Claude Code subscription package that is `pi-claude-code-provider/sonnet`. To use Opus through that package set `PI_MODEL=pi-claude-code-provider/opus`. Ids such as `anthropic/claude-opus-4-7` belong to Pi's built-in Anthropic provider and only work with an `ANTHROPIC_API_KEY`. `pi --list-models` prints every id Pi knows. |
| `SECRETARY_TIMEZONE=` | IANA zone for reminders and cron jobs, for example `Europe/Berlin`. Empty means the Windows system zone. |
| `SECRETARY_SHELL=` | Full path to `bash.exe` if Git is not installed at `C:\Program Files\Git`. |
| `WORKSPACE_DIR=./workspace` | Where the assistant keeps its memory file, scripts, and files you send. |
@@ -113,7 +113,8 @@ Alternatively, Windows Task Scheduler can start `run.bat` at logon, but any star
| `Config error: TELEGRAM_BOT_TOKEN is required` | `.env` is missing or the line is empty | Run `run.bat`, fill in the token, save |
| `.env still contains the placeholder bot token` | The example value was never replaced | Paste the real token from BotFather |
| `Startup failed: GrammyError: Call to 'getMe' failed! (401: Unauthorized)` | The token is wrong or was revoked | Copy it again from BotFather, or send `/revoke` there and use the new one |
| `Startup failed: Error: No model available` or `No credentials for provider` | Pi has no working model credentials | Run `pi` in a terminal and log in, or set `PI_MODEL` plus the provider's API key in `.env` |
| `Startup failed: Error: Model "anthropic/..." (from PI_MODEL) has no credentials for provider "anthropic"` | `PI_MODEL` names a model from a provider you have no key for | Use one of the ids the message lists, for example `pi-claude-code-provider/opus`, or leave `PI_MODEL` empty |
| `Startup failed: Error: No model available` or `No model has credentials at all` | Pi has no working model credentials | Run `pi` in a terminal and log in, or set `PI_MODEL` plus the provider's API key in `.env` |
| Bot says `🟢 Online.` but never answers your messages | `TELEGRAM_OWNER_ID` is not your id | Look in the console for `ignoring update from user 987654321`, put that number in `.env`, restart |
| `409: Conflict` in the console | A second copy of the bot is running with the same token | Stop the other one (another window, pm2, or Docker) |
| Voice notes reply "Voice transcription is not configured" | No OpenAI key | Add `OPENAI_API_KEY` to `.env` and restart |