Skip to content

Only require a key for modes that call the API - #19

Merged
bijay-odyssey merged 1 commit into
mainfrom
fix/keyless-modes
Sep 14, 2026
Merged

bijay-odyssey merged 1 commit into
mainfrom
fix/keyless-modes

Conversation

@bijay-odyssey

Copy link
Copy Markdown
Owner

CONTRIBUTING.md promises "81 tests, all offline — no key needed". Via ./start.sh test that was false: the key check ran before mode dispatch, so every mode demanded a Groq key.

Two modes it hurt most:

  • test — the entire suite is offline and uses FakeProvider. A contributor wanting to run tests was forced to sign up for an API key first.
  • check — diagnosing a missing key is its whole purpose. It refused to start when the key was missing, which is exactly the situation it exists to explain.

The key check now runs after mode dispatch and applies only to run, demo and ask.

$ mv .env .env.bak

$ ./start.sh test
81 passed in 0.44s

$ ./start.sh check
  ok    dependencies          installed
  FAIL  api key               GROQ_TOKEN not set
          copy .env.example to .env and add your key
          get one at https://console.groq.com/keys

CI now runs the launcher

Three launcher bugs shipped in a row — Python not found on Windows, a two-word candidate that could not be invoked, and dependency installation silently skipped — because CI installed dependencies itself with pip install -e and never touched start.sh. Every one was found by hand, by cloning the public repo into a clean directory.

A second job now runs ./start.sh test on a clean checkout with no venv, no .env and no key, which is exactly the path all three bugs lived on. It also asserts that a keyless mode does not leave a stray .env behind.

@bijay-odyssey
bijay-odyssey merged commit febdcd6 into main Sep 14, 2026
2 checks passed
@bijay-odyssey
bijay-odyssey deleted the fix/keyless-modes branch September 14, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant