Skip to main content

NSR as a Model Provider

The NSR server speaks three wire protocols besides its native /v1/decisions surface, so existing tools can point at it unchanged. Every completion then runs through the neuro-symbolic pipeline — GSS grounding, policy rules, safety gates, refuse-by-default — instead of a bare LLM. All three support streaming (SSE), tools, and both auth styles — x-api-key: <key> or Authorization: Bearer <key>.

The model

The model is nazarae-1, with three mode variants: Legacy nsr-v2-* ids remain served as aliases for existing configs. GET /v1/models lists the aliases. Unknown model names are accepted and mapped by heuristic — *safe* → safe, *fast* or *mini* → fast, anything else → accurate — so a config naming another vendor’s model still works.
Set BASE to your deployment (e.g. https://api.stateset.ai, or http://127.0.0.1:8080 locally) and MODEL_API_KEY to your NSR API key in the examples below.

Claude Code

Claude Code streams from /v1/messages and preflights token counts via /v1/messages/count_tokens; both are served.
The Messages surface also accepts NSR extensionsfacts, rules, and hydrate_org_context — in the request body, so a turn can be policy-grounded without leaving the Anthropic wire format.

Codex

~/.codex/config.toml:
wire_api = "responses" is required — recent Codex versions dropped wire_api = "chat". The chat wire is still served for other OpenAI-compatible clients.

OpenCode

Any OpenAI or Anthropic SDK

Point the SDK’s base_url at your NSR deployment and use any NSR API key. Errors come back in each provider’s native error envelope, so existing error handling keeps working.

What changes

The wire format is identical, but the behavior is not. Because every completion goes through the neuro-symbolic pipeline, the model will refuse rather than guess when it cannot ground an answer. Expect refusals where a bare LLM would have produced confident text — that is the intended behavior, not a failure.