AI This article was created with the help of AI.

Connecting an OpenAI-compatible endpoint

You can keep Cursor as your editor while testing open-weight models through a custom endpoint. Begin with Ask/chat using Lyceum’s documented setup. A compatible API format is a starting point, but model features, client support and billing still need checking.

The OpenAI Python client supports a custom base_url, which lets compatible providers use familiar request patterns. That does not guarantee identical streaming events, tool calls, usage fields or model-specific options. Cursor must also support the model and response format you select.

  • Set the provider base URL, API key and exact model ID
  • Keep your editor and repository, but retest prompts and any model-dependent features
  • Provider usage is billed separately; your Cursor subscription and applicable team-plan charges still need budgeting

One caveat belongs in the framing rather than in a footnote. Wire-protocol compatibility is the transport layer; the semantic layer, chat templates, tokenizer behaviour, tool-call formatting, still varies between models, and that is what breaks when you switch models on an OpenAI-compatible API. For an Ask-panel workflow the surface area is small, which is why this swap is configuration rather than a migration.

What Cursor will and will not route

Lyceum’s current Cursor setup guide specifies a paid plan. Confirm that your account exposes the custom OpenAI key and base-URL controls before configuring them. Plan features and interface labels can change; do not infer eligibility from an old screenshot.

Cursor surfaceWhat to rely on for this setup
Ask / chatThe route documented by Lyceum; test your chosen model
Local AgentProvider- and model-dependent; not validated for Lyceum in this review
ComposerCursor’s own model is not replaced by a Lyceum key
Tab completionUses Cursor’s built-in models
Cloud / Background Agents and AutoNot covered by this custom-key setup

Do not equate “chat models” with “Ask mode only”. OpenAI documents supported local Chat and Agent requests using a personal API key, with gateway compatibility varying by provider. Lyceum’s guide currently limits its recommendation to Ask/chat. That difference does not establish Agent support for a particular Lyceum model. Tab, Auto and cloud/background agents are outside this setup.

For a Lyceum agent workflow, use the current Claude Code setup or Using Lyceum Models in opencode: Custom Provider Setup. The Claude Code guide recommends the lyceum code launcher. If you test Cursor Agent instead, verify tool use on a disposable project and confirm where requests are billed before relying on it.

Adding the model and the key

The whole setup lives in one settings panel. Open Cursor Settings (Cmd +,), go to Models, and scroll to API Keys. Then work through the fields in this order:

  1. Under Model Names, add a serverless model ID, for example z-ai/glm-5.2.
  2. In OpenAI API Key, paste your lk_ key from the dashboard.
  3. Enable Override OpenAI Base URL and set the value shown below.
  4. Click Verify.

These values are a reference for the settings fields, not an importable Cursor configuration file:

{
  "model_name": "z-ai/glm-5.2",
  "openai_api_key": "lk_your_api_key_here",
  "override_openai_base_url": "https://api.lyceum.technology/openai/v1"
}

Use https://api.lyceum.technology/openai/v1 as the base URL, without a trailing /chat/completions. Copy the complete value from the example. Adding the request path to the base URL can cause an incorrect URL.

Verifying the connection

Lyceum’s guide says Verify sends a test using the first custom model. Add the model before verifying, and inspect the reported error if it fails. A successful verification is a connection check, not proof of complete model or feature compatibility.

  • A successful Verify shows that Cursor’s validation request succeeded
  • A failed Verify can involve authentication, the base URL, model access, credits, rate limits, networking or service availability
  • Test the selected model in Ask/chat after verification. Agent tool use and other features need separate checks

After verification, select the custom model in the Ask/chat picker and send a small prompt. Confirm its usage in your provider account. If it is missing, check that it is enabled and reopen the panel; inspect the client’s error details if the problem persists.

Choosing a model for daily work

On 17 September 2026, GET /openai/v1/models listed the 3 IDs below. Roster presence is not a Cursor compatibility test. Use the live endpoint when configuring a client; the dated model-roster article provides background rather than a guarantee of current availability.

Model IDLive roster checkCursor validation
z-ai/glm-5.2Listed on 17 September 2026Test your client; not verified here
moonshotai/kimi-k2.7-codeListed on 17 September 2026Test your client; not verified here
minimax/minimax-m3Listed on 17 September 2026Test your client; not verified here

A model’s hosting region does not establish the location of the entire Cursor request path. Cursor says requests pass through its servers for final prompt building, including requests using your own key. Review both services’ data handling if residency matters. For model-selection background, see the best open model APIs for agentic coding.

Lyceum documents case-insensitive IDs and slash-free aliases such as z-ai-glm-5.2. Prefer the canonical ID unless the client rejects it. For a blank reply, inspect the raw content, reasoning or reasoning_content, finish_reason and tool_calls. Missing reasoning display does not by itself explain missing final answer text.

When Verify fails or the model disappears

Use the error and a direct endpoint check to narrow the cause. The same visible symptom can have several explanations:

SymptomWhat it meansFix
Model name is not valid / AI Model Not FoundModel ID, availability or selected-mode incompatibilityCheck the live ID and try the documented Ask/chat route
Verify fails or times outAuthentication, URL, model access, credits, limits or connectivityInspect the error; check the full base URL and account status
Blank reasoning-model replyOutput truncation, pending stream, tool call or parsing issueInspect the complete response; increase the cap when reasoning consumes it

Do not treat a model-name error as proof that you are in Agent mode. Start with the exact ID, endpoint and the documented Ask/chat path. Cursor’s API-key guidance does not promise support for every OpenAI-compatible model. A timeout also does not identify the base URL as the sole cause.

If a previously working model fails, compare its exact ID with the live roster and check service status. A historical roster article can help explain earlier changes, but it cannot confirm that an ID is callable today.

Serverless Inference provides hosted model APIs without provisioning your own GPU. This guide concerns compatible chat models. Embedding, image and video endpoints have different request formats; changing only the model string does not make those workloads available in Cursor chat.

  • Measure the provider cost of the requests actually routed to your custom model
  • Keep the Cursor subscription in the comparison, along with any plan-specific usage charges
  • Test a representative workload before projecting savings across a team

Cursor’s current billing guidance says individual-plan requests using your own key are billed by the provider outside included usage. Teams and Enterprise also apply a Cursor Token Rate of $0.25 per million input, output and cached tokens. Check the current plan terms before estimating savings. Get a key in the Lyceum dashboard and start with a small chat test.