SugarDocs

Providers and models#

Sugar manages hosted API providers, prepaid coding plans, a self-hosted Ollama endpoint and an operator-managed OpenAI-compatible endpoint. This page covers connecting a provider, bringing its lanes into service and recording what a lane can actually do.

Before you start#

  • A provider credential with access to the models you intend to expose.
  • A known billing posture and model family for the provider.
  • Network access from the Sugar service to the provider endpoint.
  • Administrator access to the portal.

Connect a provider#

Open Admin → Providers, add or update the credential, run Test, run Sync models, then enable the models and API exposure your clients need. Use the Supply Policy editor on the same page to order equivalent lanes.

Test proves only what the provider's catalogue proves. On Ollama Cloud, opencode Go, opencode Zen, OpenRouter and Cline Pass the catalogue is public, so a passing test reports reachability and a model count and does not confirm the key or the plan. On every other provider the catalogue is credentialed and a passing test also clears that provider's circuit breakers.

Prepaid plans and lane order#

Prepaid lanes lead metered lanes for the same model release. Within the prepaid tier the shipped order is:

Provider Priority Notes
Vendor plans (MiniMax, Z.ai, Moonshot) 5 One family lane each.
opencode Go 6 Seeds all four families; sync replaces seeded data.
Ollama Cloud 7 Seeds the MiniMax lane only.
Cline Pass 8 Lanes seeded from code; sync is refused.
Local Ollama 9 Self-hosted, direct-only, seeds no family.

Local Ollama is registered as a prepaid lane rather than a tier after the metered providers, but its models carry no family, so they never compete for sugar/conduit. Call them by their own sugar/ollama-local/… ids after an administrator enables and exposes each one.

Self-hosted and compatible endpoints#

Local Ollama has no environment configuration path. Save its base URL and credential on its provider card in the portal, behind a protected private endpoint, bearer proxy or access gateway; there is no OLLAMA_LOCAL_ENDPOINT variable to set. Discovered models remain direct-only until an administrator enables them.

The generic compatible seam is environment-only and is considered only under its documented family attestations. Treat its base URL as a prompt-disclosure boundary.

Cline Pass#

Cline Pass is a flat-rate subscription over open-weight coding models. Set CLINE_PASS_API_KEY or save the key in the portal; the base URL is https://api.cline.bot/api/v1.

Its public /models lists the usage-billed Cline catalogue rather than the plan's models, so Sync models is unavailable and returns HTTP 409 provider_catalog_seeded. Sugar seeds the plan's lanes itself:

Lane Public id Context window
Kimi K2.7 Code sugar/kimi 262,144
DeepSeek V4 Pro sugar/deepseek 1,048,576
MiniMax M3 sugar/minimax 1,048,576
GLM-5.2 candidate sugar/glm Dark candidate; not a live lane

Important: these figures come from Cline's published documentation and client catalogue. Sugar has not verified them with a live request, and the lanes' tool and reasoning support is asserted rather than measured. Treat your first live request as the verification.

Bring a seeded lane into service#

A seeded lane serves nothing until it is qualified and admitted — including a request that names sugar/kimi directly.

  1. Open Admin → Providers and expand the model row.
  2. Record the release qualification checks with their evidence.
  3. Enable the lane and, for Conduit traffic, enable it for Conduit.
  4. Open the Supply Policy editor. A lane the active revision predates is listed as Not yet admitted in its default position.
  5. Select Save order to create the revision that admits it.

A fresh database's initial policy already lists the seeded lanes. An install still on the untouched initial revision upgrades itself once; any other install needs the editor.

Record a capability finding#

Sugar refuses a tool-bearing request on any lane whose catalogue entry does not declare tool support, and a catalogue can only claim a capability or stay silent. When a lane does support tools and its entry never said so, open Providers → the lane → Capabilities and record the finding. Embedding lanes offer the dimensions finding instead.

An operator finding outranks the catalogue reading, can also rule a capability out, and survives re-seeding and every model sync.

Verify#

Test each enabled provider, refresh /api/v1/models, then make streaming and non-streaming requests to one exposed model. Confirm the returned model and route match the configured lane. Disable the lane and verify new traffic no longer selects it.

If it does not work#

  • Sync models is disabled and returns provider_catalog_seeded. Expected on Cline Pass. Correct a seeded lane through its model row, not through sync.
  • A lane is enabled but never selected. Check the release qualification and the Supply Policy admission state; the supply map names families waiting on either.
  • Tool calls fail on one lane only. The catalogue declares no tool support. Record a capability finding, or route the work elsewhere.

Related: Routing and failover and Troubleshooting.