Cursor LLM gateway config is a no-op: writes settings Cursor never reads
I maintainer di solito rispondono entro 1 giorno
@stantheman0128 ci sta già lavorando.
Dal 4/9/2026.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia da pkg/client/config.go:485-521 e pkg/client/llm_gateway.go:39-89, quindi segui il percorso di Cursor utilizzato da thv llm setup --client cursor. Determina se Cursor dispone di una superficie di configurazione affidabile e supportata oppure se il client debba essere contrassegnato come non supportato; il lavoro è completato quando il comportamento scelto è implementato e setup non dichiara più silenziosamente il successo per un’integrazione inefficace.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
thv llm setup --client cursor reports success and patches ~/Library/Application Support/Cursor/User/settings.json with:
"cursor.general.openAIBaseURL": "http://localhost:14000/v1",
"cursor.general.openAIAPIKey": "thv-proxy"
(pkg/client/config.go:517-519, via ConfigureLLMGateway in pkg/client/llm_gateway.go). The gateway proxy (thv llm proxy start) starts and responds correctly. But nothing changes in Cursor: Settings → Models → "Override OpenAI Base URL" stays off, and manually switching it on shows the stock default (https://api.openai.com/v1), not the value from settings.json.
Root cause
Checked directly against the installed Cursor client (workbench.desktop.main.js, Cursor 3.15.19). The keys ToolHive writes — openAIBaseURL / openAIAPIKey (with that exact casing, under cursor.general.*) — do not appear anywhere in the bundle. The feature Cursor actually has is openAIBaseUrl (lowercase Url) plus a separate useOpenAIKey boolean, and both are read and written exclusively through Cursor's own internal state store, not the standard VS Code configuration service:
this.reactiveStorageService.applicationUserPersistentStorage.openAIBaseUrl ?? "https://api.openai.com/v1"
...
i.setApplicationUserPersistentStorage("openAIBaseUrl", v)
i.setApplicationUserPersistentStorage("useOpenAIKey", !0)
There is no code path in the bundle that reads cursor.general.openAIBaseURL (or any cursor.general.* key) from settings.json for this feature. So ConfigureLLMGateway for Cursor patches a file/key that the current app never consults — thv llm setup succeeds and reports nothing wrong, but the integration silently does nothing.
I have not yet located where applicationUserPersistentStorage actually persists to disk — a search of ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb's ItemTable for openai/baseurl/apikey-like keys came up empty, so it's under a different key format, a different table, or a different storage file entirely.
Why this needs care, not just a key-name fix
applicationUserPersistentStorage is Cursor's own internal, undocumented storage mechanism — not a stable public API surface the way settings.json is. Even once the correct persistence location is found, writing into it directly is inherently more fragile than the settings.json approach ToolHive uses for every other client, and could silently break again on a future Cursor release. Worth deciding whether:
- It's worth reverse-engineering and writing to Cursor's private storage anyway (accepting the fragility), or
- Cursor should be marked as unsupported for the LLM gateway proxy-mode integration until/unless Cursor exposes a supported configuration surface for this, or
- Some other integration point exists (e.g. a documented settings key for a different mechanism, or an extension-based approach) that hasn't been checked yet.
Impact
Every thv llm setup --client cursor run to date has silently failed to configure Cursor, while reporting success. Given IsClientInstalled/DetectedLLMGatewayClients both consider Cursor supported and configured, this has presumably shipped since Cursor support was added and gone unnoticed.
References
pkg/client/config.go:485-521(Cursor'sclientAppConfig, including theLLMGatewayKeysspecs)pkg/client/llm_gateway.go:39-89(ConfigureLLMGateway, the JSON-Pointer patch path used for Cursor)- Related: #6292 (Cursor/VSCode detection false negatives) — that issue is about detection; this one is about the actual configuration being applied being ineffective even when detection succeeds.
- Lingua principale
- Go
- Stelle
- 2.3k
- Fork
- 318
- Merge medio
- 1g 21h
- PR unite (30g)
- 96
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stacklok/toolhive
-
Claude Desktop config and detection paths are wrong on LinuxForse già presa @jerm-dro l’ha presa oggi. Apertabug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
proxyrunner tool-filter middleware strips SEP-2322 Modern envelope from tools/list, breaking vMCP health checksForse già presa @alex-feel l’ha presa 25 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stacklok/toolhive#6684 · 5 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
HttpClientBuilder.Build() ignores HTTP(S)_PROXY (auth-server OAuth/DCR calls bypass forward proxy)Forse già presa @schonmann l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
stacklok/toolhive#6671 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
`thv run` ignores `--oidc-insecure-allow-http` and `--thv-ca-bundle` — both dropped in `createOIDCConfig` (same as #1470)Forse già presa @7487 l’ha presa 43 giorni fa. Apertaauthentication bug cli oidc p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stacklok/toolhive#6522 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Delete the dead pkg/vmcp/server/adapter packageForse di nuovo libera @suantea l’ha presa 10 giorni fa e non c’è nessuna pull request aperta. Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stacklok/toolhive
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Rafaeldelinares/gentle-mesh#125 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Gentleman-Programming/gentle-ai#5643 ·
I maintainer di solito rispondono entro 1 giorno
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
FootprintAI/Containarium#2869 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
kubevirt/kubevirt#19559 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug raised-by:verifier
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
medici-finance/assay#3817 ·
I maintainer di solito rispondono entro 1 giorno