Skip to content

Improve error messages for missing API keys #6

Description

@xmaks82

Description

When a user tries to use a model without the required API key, the error message should be more helpful.

Current behavior

Generic error or traceback when API key is missing.

Expected behavior

Clear message like:
```
Error: GROQ_API_KEY is not set.

To fix this:

  1. Get a free key at https://console.groq.com/
  2. Add it to your .env file: GROQ_API_KEY=gsk_...
  3. Or set it: export GROQ_API_KEY=gsk_...

Available providers with configured keys: SambaNova, Cerebras
```

Files to modify

  • `src/agent/clients/factory.py` — create_client()
  • `src/agent/main.py` — check_api_keys()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions