Skip to content

feat: add bedrock-mantle vendor for Bedrock's OpenAI-compatible endpoint - #20

Merged
davehorton merged 1 commit into
mainfrom
feat/bedrock-mantle-adapter
Aug 3, 2026
Merged

davehorton merged 1 commit into
mainfrom
feat/bedrock-mantle-adapter

Conversation

@davehorton

Copy link
Copy Markdown
Contributor

Adds a bedrock-mantle vendor for Amazon Bedrock's OpenAI-compatible surface — the endpoint that resells third-party open-weight models (Z.ai GLM, Moonshot Kimi, xAI Grok, DeepSeek, MiniMax, Qwen, …) behind one endpoint and one Bedrock API key.

Why

The jambonz hosted-LLM catalog resells these models. Today each provider needs its own alias (zai, moonshot, xai) that differs from the others only in its default baseURL — so onboarding a newly-launched Bedrock model requires a library release even though the wire protocol, endpoint, and credential are all identical.

Because the model id carries the provider (zai.glm-5, moonshotai.kimi-k2.5), one vendor covers the whole catalog. A new Bedrock model becomes a data change.

This is not the existing bedrock adapter, which speaks the native Converse API via the AWS SDK and supports SigV4/IAM. That one stays the right choice for Anthropic and Nova models.

Notes

  • knownModels is a deliberate convenience seed, not a source of truth — supportsModelListing is true and the live /v1/models listing is authoritative. Uncurated ids stream fine and surface from listAvailableModels() without metadata.
  • AWS publishes no context-window metadata (neither /v1/models nor GetFoundationModel returns it), so the limits in knownModels are carried over from the native-vendor manifests for the same underlying models. Vision follows Bedrock'''s inputModalities.
  • prompt_cache_key is not forwarded: Mantle fronts many third-party runtimes with differing param strictness and none are verified. Added to the gating test'''s deny list.
  • normalizeAuth passes api_url through, which the hosted path relies on — xAI models are served only on /openai/v1, and a 401 "Berm is not enabled" means the wrong path rather than a missing entitlement.

Verification

  • 19/19 contract-kit checks pass for the new adapter
  • Full suite green (515 tests), lint and typecheck clean, build + ESM/CJS smoke OK
  • getManifest() includes the vendor, so api-server'''s /LlmVendors/manifest and the webapp add-LLM form pick it up with no change

Version intentionally not bumped.

🤖 Generated with Claude Code

One vendor covering Bedrock's resold open-weight catalog (GLM, Kimi, Grok,
DeepSeek, MiniMax, Qwen) behind a single endpoint and Bedrock API key, so a
newly-launched model is usable by id with no library release. knownModels is a
convenience seed only — the live /v1/models listing is authoritative.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@davehorton
davehorton merged commit ee456d9 into main Aug 3, 2026
2 checks passed
@davehorton
davehorton deleted the feat/bedrock-mantle-adapter branch August 3, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant