Skip to content

v1.12.0 — Canonical provider contract

Choose a tag to compare

@stackbilt-admin stackbilt-admin released this 05 Jun 20:19
· 28 commits to main since this release

Canonical provider contract hardening from issue #81 / PR #82. Additive only.

Added

  • Exported canonical provider contract types, including CanonicalLLMRequest, CanonicalLLMResponse, and related helper types.
  • Added normalizeLLMRequest() to map compatibility LLMRequest fields into the canonical shape.
  • Added canonicalToLLMRequest() to convert canonical requests back into existing adapter input while providers migrate internally.
  • Added normalizeLLMResponse() for stable canonical response routing metadata, fallback/degradation fields, normalized error slots, and provider-extra metadata.
  • Added contract tests covering OpenAI-compatible, Anthropic-compatible, Groq/Cerebras, NVIDIA, and Cloudflare adapter preparation without live API calls.
  • Documented the gateway boundary: client protocol -> gateway adapter -> CanonicalLLMRequest -> llm-providers -> vendor API.

Validation

  • npm run typecheck
  • npm test
  • npm run test:package
  • npm audit --omit=dev