llm reads OPENAI_BASE_URL but not OPENAI_API_BASE — and replaying a whole script of llm calls offline #1688
xizhuomengcontin
started this conversation in
Tips and tricks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Two small things, one of which is useful on its own.
llmhonoursOPENAI_BASE_URL, notOPENAI_API_BASEIf you want to point
llmat a local endpoint or a gateway without editingextra-openai-models.yaml, only one of the two common spellings works. Local HTTP server on127.0.0.1returning a canned chat-completion and logging the path it is asked for, llm 0.35:Both names turn up across the ecosystem — I have probed libraries that honour both, and one that honours neither because it pins the origin in its own config — so it is worth knowing which one
llmreads before you assume your traffic went where you meant it to.Replaying a session, which
llm logsdeliberately does not dollm logsalready gives you every prompt and response in SQLite, and for most purposes that is the right tool — it is searchable, it is yours, and it needs nothing extra.What it does not do is let you run the thing again without calling the model. That is the gap I fill with a recording proxy:
Because the recorder wraps the process rather than
llmitself, a whole shell script full ofllminvocations records as one run and replays as one run — which is the case I actually wanted it for: a pipeline of half a dozenllmcalls that you want to iterate on without paying for the whole chain each time.orca replay last --from N --model <other>replays up to step N from the recording and then continues on a different model, so comparing models over a fixed prefix is a single command.Disclosure: OrcaReplay is mine — Apache-2.0, Node 20+, no account, replay needs no key. The
llmmeasurement above stands on its own.What it does not give you
llm embedwork is not served from the recording.llm logsis simpler and you should use that.All reactions