Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/AlphaBitCore/nexus-gatewayWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/alphabitcore/nexus-gateway/provider-adapter-canonical-openai)<a href="https://agentmods.dev/rules/alphabitcore/nexus-gateway/provider-adapter-canonical-openai"><img src="https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/provider-adapter-canonical-openai/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/alphabitcore/nexus-gateway/provider-adapter-canonical-openai"><img src="https://agentmods.dev/badge/rules/alphabitcore/nexus-gateway/provider-adapter-canonical-openai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01739 |
| Opus 5 | $0.00000 | $0.00870 |
| Sonnet 5 | $0.00000 | $0.00348 |
| Haiku 4.5 | $0.00000 | $0.00174 |
Grade A, and why
provider-adapter-canonical-openai scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
// Verified again 2026-05-12 via direct curl. Confirmed: deprecation, not a transient. How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Provider adapter: canonical = OpenAI shape (binding)
You are editing a provider adapter or its codec. The 8 binding rules below come from docs/developers/architecture/services/ai-gateway/provider-adapter-architecture.md §3a. Apply to every adapter PR.
Read docs/developers/architecture/services/ai-gateway/provider-adapter-architecture.md §3a BEFORE editing.
Rule 1 — Canonical format is OpenAI chat-completions shape
All internal flow (router input, cache key, hook input, audit envelope, request lineage) sees the canonical form, which is OpenAI's shape:
model · messages[] · max_tokens / max_completion_tokens · temperature · top_p · top_k ·
stream · stop · response_format · tools[] · tool_choice · parallel_tool_calls ·
metadata · stream_options
New canonical fields require an architecture-doc PR — adapters do not add canonical fields unilaterally.
Rule 2 — Each non-OpenAI adapter owns its full bidirectional translation
When you add an Anthropic / Gemini / Bedrock / Cohere / Replicate codec:
SchemaCodec.EncodeRequestdoes canonical → wire.SchemaCodec.DecodeResponsedoes wire → canonical.
The OpenAI side stays pure (identity codec) — it never carries case-statements for "this came from Anthropic so do X". OpenAI shape is the bus; every other shape adapter wires itself into the bus.
Rule 3 — Per-model wire quirks belong in their own adapter
HTTP-400-deprecations, parameter renames, mandatory clamping — they live in the adapter that talks to that wire. Not in cross-adapter case-statements in spec_adapter.go's shared helpers.
| Quirk | Lives in |
|---|---|
| claude-opus-4-7 deprecates temperature/top_p/top_k | specs/anthropic/codec/codec.go::anthropicModelRejectsSamplingParams |
| claude-4.x rejects temperature + top_p together | specs/anthropic/codec/codec.go::anthropicModelRejectsTempTopPTogether |
| gpt-5.x / o-series rename max_tokens → max_completion_tokens + strip temp/top_p | specs/openai/rewrites (ApplyReasoningRewrites, wired as the OpenAI PassthroughRewrite) |
| kimi-k2.5/k2.6 require temperature=1 | specs/compat/moonshot/rewrites.go (ApplyRewrites, wired as the Moonshot PassthroughRewrite) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 130 lines · 0 tokens per session scan A 296a8990d172
provider-adapter-canonical-openai is a cursor rule published in the GitHub repository AlphaBitCore/nexus-gateway (23 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,739 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
gateway
The gateway core module is the central orchestrator that handles AI provider requests, manages caching, queuing, and provides unified interfaces for chat completion, embeddings, and tool responses.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.