diff --git a/.env.example b/.env.example index 9b26bd8..de11ed0 100644 --- a/.env.example +++ b/.env.example @@ -42,8 +42,11 @@ TELEGRAM_ALLOWED_USERS= # Higher = more thorough but slower/pricier. Changeable live from chat via /effort. # OGMA_EFFORT= -# Model for the nightly dream/memory-consolidation job (default: sonnet) -# OGMA_DREAM_MODEL=sonnet +# Model for the nightly dream/memory-consolidation job (default: claude-sonnet-4-6). +# Use the explicit standard-context id, not the bare 'sonnet' alias: in headless runs +# the alias can resolve to the credit-gated 1M-context variant and fail with +# "Usage credits required for 1M context". The explicit id forces the 200k window. +# OGMA_DREAM_MODEL=claude-sonnet-4-6 # --- optional: briefing / news --- # Who the morning briefing is addressed to (default: "you") diff --git a/CHANGELOG.md b/CHANGELOG.md index e1885a8..f0c2331 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project aims to follow [Semantic Versioning](https://semver.org/). +## [1.0.1] — 2026-06-17 + +### Fixed +- **Nightly dream / briefing no longer trip the 1M-context credit gate.** The headless jobs + (`bin/dream`, `bin/briefing`) defaulted to the bare `sonnet` alias, which in headless runs can + resolve to the credit-gated 1M-context model variant and fail with *"Usage credits required for + 1M context"* — silently skipping a nightly memory consolidation. They now default to the explicit + standard-context id `claude-sonnet-4-6` (matching what `bin/setup` already writes for the gateway), + which forces the standard 200k window. Override via `OGMA_MODEL` / `OGMA_DREAM_MODEL` as before. + ## [1.0.0] — 2026-06-16 First stable release. The public surface — the `OGMA_*` settings, the `/new` · `/model` · `/effort` · @@ -122,6 +132,7 @@ First public release. A minimal, self-hosted bridge from Telegram to Claude Code - Single shared brain — multiple allow-listed chats share one persona/workspace/memory. Per-user isolation is planned (see issues). +[1.0.1]: https://github.com/eric-wien/ogma/releases/tag/v1.0.1 [1.0.0]: https://github.com/eric-wien/ogma/releases/tag/v1.0.0 [0.5.0]: https://github.com/eric-wien/ogma/releases/tag/v0.5.0 [0.4.0]: https://github.com/eric-wien/ogma/releases/tag/v0.4.0 diff --git a/README.md b/README.md index 146c8ee..03d0b56 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ See [`skills/README.md`](skills/README.md) for details and how to write your own | `OGMA_MODEL` | gateway model (live-changeable via `/model`) | Claude Code default | | `OGMA_FALLBACK_MODEL` | model used if the primary is unavailable (live via `/fallback`) | none | | `OGMA_EFFORT` | reasoning effort `low`..`max` (live-changeable via `/effort`) | CLI default | -| `OGMA_DREAM_MODEL` | nightly memory job model | `sonnet` | +| `OGMA_DREAM_MODEL` | nightly memory job model (standard-context id avoids the 1M credit gate) | `claude-sonnet-4-6` | | `OGMA_OWNER_NAME` | who the briefing addresses | `you` | | `OGMA_WEATHER_LOC` | wttr.in location for the briefing | geolocate by IP | | `OGMA_RSS_FEEDS` | `Label\|url` pairs for the briefing | generic world-news set | diff --git a/bin/briefing b/bin/briefing index d47db2f..e4c1735 100755 --- a/bin/briefing +++ b/bin/briefing @@ -7,7 +7,7 @@ # OGMA_OWNER_NAME who the briefing is for (default: "you") # OGMA_WEATHER_LOC wttr.in location, e.g. "Vienna" (default: empty = geolocate by IP) # OGMA_RSS_FEEDS feeds for news-fetch (see bin/news-fetch) -# OGMA_MODEL Claude model (default: sonnet) +# OGMA_MODEL Claude model (default: claude-sonnet-4-6) # Customise the prompt below for your own tone, topics, and language. set -uo pipefail @@ -26,7 +26,10 @@ cfg() { grep -E "^OGMA_${1}=" "$ENV" 2>/dev/null | cut -d= -f2- } -model="$(cfg MODEL)"; model="${model:-sonnet}" +# Explicit standard-context id, not the bare 'sonnet' alias — the alias can +# resolve to the credit-gated 1M-context variant in headless runs. Keep in sync +# with bin/setup and bin/dream. +model="$(cfg MODEL)"; model="${model:-claude-sonnet-4-6}" owner="$(cfg OWNER_NAME)"; owner="${owner:-you}" loc="$(cfg WEATHER_LOC)" # empty => wttr.in geolocates by IP now="$(date +%s)" diff --git a/bin/dream b/bin/dream index 9a899ac..b8e0bd8 100755 --- a/bin/dream +++ b/bin/dream @@ -27,7 +27,11 @@ cd "$HOME" || exit 1 cfg() { grep -E "^OGMA_${1}=" "$ENV" 2>/dev/null | cut -d= -f2- } -model="$(cfg DREAM_MODEL)"; model="${model:-sonnet}" +# Default to the explicit standard-context model id, NOT the bare 'sonnet' alias: +# in headless runs the alias can resolve to the credit-gated 1M-context variant +# (a large nightly transcript sweep tripped "Usage credits required for 1M context"). +# Pinning the full id forces the standard 200k window. Keep in sync with bin/setup. +model="$(cfg DREAM_MODEL)"; model="${model:-claude-sonnet-4-6}" read -r -d '' PROMPT <