chore(v0.3.0): rename fast-LLM env vars to TIMEWEB_* (match other projects)
Aligns with the user's other repos (proso) which use TIMEWEB_API_GROK / TIMEWEB_URL_GROK. Single naming convention across projects avoids the 'which env var was it for this repo' mental tax. PEPA_FAST_LLM_BASE_URL → TIMEWEB_BASE_URL PEPA_FAST_LLM_API_KEY → TIMEWEB_API_KEY PEPA_FAST_LLM_MODEL → TIMEWEB_MODEL PEPA_FAST_LLM_TIMEOUT_MS → TIMEWEB_TIMEOUT_MS Provider still works with any OpenAI-compatible endpoint — TimeWeb is the default but the variable name doesn't lock us in. Tests + docs + .env / .env.example updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ L10 village_full глобальная цель (ферма + дом + сосе
|
||||
- `runtime/coach/advice.js`: `normalisePreferSkill` строго отбрасывает
|
||||
всё, что не в реестре (raise log, не дрейфит на fuzzy)
|
||||
- `runtime/llm/provider.js` — OpenAI-совместимый клиент, конфигурируется
|
||||
через env (`PEPA_FAST_LLM_BASE_URL`, `_API_KEY`, `_MODEL`); graceful
|
||||
через env (`TIMEWEB_BASE_URL`, `TIMEWEB_API_KEY`, `TIMEWEB_MODEL`); graceful
|
||||
fallback "no-op" если env не задан (бот не падает)
|
||||
- `runtime/coach/fast-advisor.js` — функция `advise({snapshot, reason})`
|
||||
с rate-limit (макс. 6 вызовов/час), таймаут 8с, JSON-парсинг ответа
|
||||
|
||||
@@ -22,10 +22,10 @@ fixed: (a) Pi now sees the real registry in its system prompt,
|
||||
namespace, with "USE ONLY THESE, never invent" instruction
|
||||
- [`runtime/llm/provider.js`](../../runtime/llm/provider.js) —
|
||||
OpenAI-compatible chat client, env-driven:
|
||||
- `PEPA_FAST_LLM_BASE_URL` (default `https://api.openai.com/v1`)
|
||||
- `PEPA_FAST_LLM_API_KEY` (required to enable; safe no-op otherwise)
|
||||
- `PEPA_FAST_LLM_MODEL` (required)
|
||||
- `PEPA_FAST_LLM_TIMEOUT_MS` (default 8000)
|
||||
- `TIMEWEB_BASE_URL` (default `https://api.openai.com/v1`)
|
||||
- `TIMEWEB_API_KEY` (required to enable; safe no-op otherwise)
|
||||
- `TIMEWEB_MODEL` (required)
|
||||
- `TIMEWEB_TIMEOUT_MS` (default 8000)
|
||||
- Supports JSON-mode via `response_format: { type: "json_object" }`
|
||||
- Surfaces `not_configured`, `no_model`, `http_<status>`,
|
||||
`network_error`, `timeout`, `bad_json` codes
|
||||
@@ -167,9 +167,9 @@ Tests: 332 green (was 315 on rc.2, +17 new):
|
||||
start growing as the registry feedback closes the loop.
|
||||
3. **Set fast-advisor env when ready to test**:
|
||||
```bash
|
||||
export PEPA_FAST_LLM_BASE_URL="https://<timeweb-endpoint>/v1"
|
||||
export PEPA_FAST_LLM_API_KEY="<key>"
|
||||
export PEPA_FAST_LLM_MODEL="gpt-5-mini"
|
||||
export TIMEWEB_BASE_URL="https://<timeweb-endpoint>/v1"
|
||||
export TIMEWEB_API_KEY="<key>"
|
||||
export TIMEWEB_MODEL="gpt-5-mini"
|
||||
```
|
||||
The advisor still isn't auto-triggered in rc.1 — it's wired in rc.3.
|
||||
4. **Pick the next rc** from PLAN.md.
|
||||
|
||||
Reference in New Issue
Block a user