OPEN_SOURCE ↗
REDDIT · REDDIT// 17d agoTUTORIAL
Cursor, LM Studio hit invalid_literal error
A user wired Cursor to an LM Studio server over Cloudflare Tunnel, but chat dies with an invalid_literal provider error. The thread suggests a Cursor BYOK/tool-schema mismatch rather than a networking problem.
// ANALYSIS
This smells like schema drift, not a broken model.
- –Cursor’s forum says local models need a publicly accessible HTTPS endpoint, and requests still flow through Cursor’s backend.
- –Cursor docs say custom API keys only work with standard chat models; Agent mode and other tool-heavy paths have known format limits.
- –LM Studio supports OpenAI-compatible chat/completions and tool calling, but the model/runtime has to emit the exact function schema Cursor validates against.
- –Cloudflare Tunnel solves reachability, not payload compatibility, so it won’t fix a malformed tools response.
- –The quickest sanity check is to try the same LM Studio endpoint with a plain OpenAI client or disable agent/tool use in Cursor.
// TAGS
cursorlm-studioideai-codingapiself-hostedllm
DISCOVERED
17d ago
2026-03-25
PUBLISHED
17d ago
2026-03-25
RELEVANCE
7/ 10
AUTHOR
Lazy_Ad98