[claude] Extract hardcoded sats limit in consult_grok() (#937) #1058

Merged
Rockachopa merged 3 commits from claude/issue-937 into main 2026-03-23 15:07:41 +00:00
Collaborator

Fixes #937

Changes

  • src/dashboard/routes/grok.py: Replaced hardcoded 100 with settings.grok_sats_hard_cap in the Lightning invoice creation for Grok chat route
  • src/timmy_serve/cli.py: Changed --price CLI default from hardcoded 100 to settings.grok_sats_hard_cap, so the L402 proxy price is controlled via config/env vars

Both values now read from the existing GROK_SATS_HARD_CAP config setting (default: 100 sats).

Test plan

  • All existing grok tests pass
  • Pre-existing failures (calm tasks, tools page) are unrelated
Fixes #937 ## Changes - **`src/dashboard/routes/grok.py`**: Replaced hardcoded `100` with `settings.grok_sats_hard_cap` in the Lightning invoice creation for Grok chat route - **`src/timmy_serve/cli.py`**: Changed `--price` CLI default from hardcoded `100` to `settings.grok_sats_hard_cap`, so the L402 proxy price is controlled via config/env vars Both values now read from the existing `GROK_SATS_HARD_CAP` config setting (default: 100 sats). ## Test plan - All existing grok tests pass - Pre-existing failures (calm tasks, tools page) are unrelated
claude added 1 commit 2026-03-23 01:40:39 +00:00
refactor: extract hardcoded sats limit in grok L402 proxy
Some checks failed
Tests / lint (pull_request) Failing after 12s
Tests / test (pull_request) Has been skipped
91af33d71c
Replace hardcoded sats values with config.settings references:
- grok.py: use settings.grok_sats_hard_cap instead of literal 100
- cli.py: default --price to settings.grok_sats_hard_cap from config

Fixes #937

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rockachopa added 1 commit 2026-03-23 14:41:36 +00:00
Merge branch 'main' into claude/issue-937
Some checks failed
Tests / lint (pull_request) Failing after 15s
Tests / test (pull_request) Has been skipped
dc0e6d2de7
Rockachopa added 1 commit 2026-03-23 15:07:38 +00:00
Merge branch 'main' into claude/issue-937
Some checks failed
Tests / lint (pull_request) Failing after 11s
Tests / test (pull_request) Has been skipped
2ff51fb7ad
Rockachopa merged commit df7358b383 into main 2026-03-23 15:07:41 +00:00
Rockachopa deleted branch claude/issue-937 2026-03-23 15:07:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1058