Skip to content

Default LLM analysis to public OpenAI endpoint (deployability slice 1) - #3

Draft
asymetryk wants to merge 2 commits into
mainfrom
cursor/deployable-llm-defaults-91a1
Draft

Default LLM analysis to public OpenAI endpoint (deployability slice 1)#3
asymetryk wants to merge 2 commits into
mainfrom
cursor/deployable-llm-defaults-91a1

Conversation

@asymetryk

Copy link
Copy Markdown
Owner

First slice of the "anybody can deploy this repo" initiative.

Problem

omnirouteConfig() in packages/core/src/analyze-llm.ts fell back to a hardcoded homelab address (http://192.168.68.51:20129/v1) and a private model (minimax/MiniMax-M3) whenever OMNIROUTE_BASE_URL / OMNIROUTE_MODEL were unset. A public deployer who sets only OPENAI_API_KEY would 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

  • Default base URL → https://api.openai.com/v1, default model → gpt-4o-mini (exported as DEFAULT_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.example reworked to show the simple public path (just OPENAI_API_KEY) with the OmniRoute/router option commented.
  • New packages/core/tests/omniroute-config.test.ts locks in the safe defaults and asserts the base URL is never a 192.168.* host.

Not touched here (tracked as separate follow-ups): K3s manifests, BASE_PATH default, generic Docker/Cloudflare deploy path, and separating private ops docs from public deploy docs.

Verification

pnpm lint, pnpm typecheck, and pnpm test all pass (25 tests total; 4 new in core).

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 27, 2026 14:57
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants