simonw / simonw/llm

No key found for openai when using local llamafile

Open
#726 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

$ llm models default llamafile
$ llm -m llamafile 'hello'
Error: No key found - add one using 'llm keys set openai' or set the OPENAI_API_KEY environment variable

Worked around with "export OPENAI_API_KEY='blah'"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with llm models default llamafile followed by llm -m llamafile 'hello', both with and without OPENAI_API_KEY. Trace how the local llamafile model is identified and how the OpenAI key requirement is triggered; done means the local command works without a key and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.