feat(llm-wrapped): declaratively configured multi-provider llm CLI#399
Draft
etrobert-bot wants to merge 1 commit into
Draft
feat(llm-wrapped): declaratively configured multi-provider llm CLI#399etrobert-bot wants to merge 1 commit into
etrobert-bot wants to merge 1 commit into
Conversation
Wraps simonw's llm with the llm-ollama plugin baked in, OPENAI_API_KEY sourced at runtime from the agenix secret, and a store-sourced extra-openai-models.yaml routing copilot-* models through the local copilot-api proxy — no `llm keys set` or hand-edited $HOME config. Installed on workstations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
llm-wrapped— simonw'sllmpackaged with the repo's wrapped pattern so switching between model providers needs no imperative setup (nollm keys set, no hand-edited files in$HOME):OPENAI_API_KEYread at runtime from the agenix secret (/run/agenix/openai-api-key), env override wins; mirrorshass-cli-wrappedextra-openai-models.yamlroutescopilot-gpt-4.1/copilot-sonnetthrough the local copilot-api proxy (modules/copilot-api.nix, port 4141)llm-ollamaplugin baked in viallm.withPluginsllmreadsextra-openai-models.yamlfromLLM_USER_PATH, which must stay writable (it holdslogs.db), so the wrapper points it at~/.local/state/llmand refreshes the store-sourced config there on every launch — the file stays declarative while state remains mutable.Installed on workstations via
modules/workstation.nix.Verification (on tower)
llm pluginsshowsllm-ollama;llm models listincludes both copilot entriesllm -m copilot-gpt-4.1 "Reply with exactly: copilot proxy works"→copilot proxy works(live, through the local proxy, no key needed)env -u OPENAI_API_KEY llm -m gpt-4.1-nano ...→ answered, proving the key comes from the agenix secret at runtime~/.local/state/llm/logs.dbUsage:
llm -m copilot-gpt-4.1 "question",llm -m gpt-4.1 "question",llm -m llama3.2 "question"(with an ollama server running).llm modelslists everything.🤖 Generated with Claude Code