Default LLM analysis to public OpenAI endpoint (deployability slice 1) - #3
Draft
asymetryk wants to merge 2 commits into
Draft
Default LLM analysis to public OpenAI endpoint (deployability slice 1)#3asymetryk wants to merge 2 commits into
asymetryk wants to merge 2 commits into
Conversation
- Track .cursor/environment.json (install + web-dev terminal) - Adjust .gitignore to allow the environment config while ignoring other .cursor contents Co-authored-by: asymetryk <asymetryk@outlook.com>
…AN host The LLM client fell back to a hardcoded homelab address (http://192.168.68.51:20129/v1) and a private model when only OPENAI_API_KEY was set, so a public deployer's key would be sent to an unrelated private host. Default to https://api.openai.com/v1 + gpt-4o-mini and only use OMNIROUTE_* when explicitly configured. Adds coverage. Co-authored-by: asymetryk <asymetryk@outlook.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.
First slice of the "anybody can deploy this repo" initiative.
Problem
omnirouteConfig()inpackages/core/src/analyze-llm.tsfell back to a hardcoded homelab address (http://192.168.68.51:20129/v1) and a private model (minimax/MiniMax-M3) wheneverOMNIROUTE_BASE_URL/OMNIROUTE_MODELwere unset. A public deployer who sets onlyOPENAI_API_KEYwould have their API key POSTed to an unrelated private host that they don't control — a credential-leak footgun and a hard blocker to self-hosting.Change
https://api.openai.com/v1, default model →gpt-4o-mini(exported asDEFAULT_LLM_BASE_URL/DEFAULT_LLM_MODEL).OMNIROUTE_*still fully honored when explicitly set (trailing slashes trimmed; blank values ignored). The operator's K3s manifests set these explicitly, so homelab behavior is unchanged..env.examplereworked to show the simple public path (justOPENAI_API_KEY) with the OmniRoute/router option commented.packages/core/tests/omniroute-config.test.tslocks in the safe defaults and asserts the base URL is never a192.168.*host.Not touched here (tracked as separate follow-ups): K3s manifests,
BASE_PATHdefault, generic Docker/Cloudflare deploy path, and separating private ops docs from public deploy docs.Verification
pnpm lint,pnpm typecheck, andpnpm testall pass (25 tests total; 4 new in core).