fix(ai): authenticate Bedrock Mantle responses

This commit is contained in:
Anatoli Tsinovoy
2026-07-30 15:21:52 +03:00
parent d44d297c15
commit ef6d4fb119
17 changed files with 607 additions and 240 deletions
@@ -31,6 +31,7 @@ import { PROVIDER_DESCRIPTORS } from "../src/provider-models/descriptors";
import {
ALIBABA_TOKEN_PLAN_STATIC_MODELS,
ANTHROPIC_CURATED_FALLBACK_MODELS,
BEDROCK_MANTLE_STATIC_MODELS,
buildFireworksFastSeed,
buildXaiOAuthStaticSeed,
clampFireworksKimiMaxTokens,
@@ -53,6 +54,7 @@ import {
applyCanonicalLimitFallback,
applyGeneratedModelPolicies,
CLOUDFLARE_FALLBACK_MODEL,
dropBedrockMantleOpenAIModels,
dropUnsupportedBedrockGeoIds,
linkOpenAIPromotionTargets,
} from "./generated-policies";
@@ -553,6 +555,8 @@ async function generateModels() {
// Seed Meta's documented Muse model so first-run selection does not depend on
// credentials or live discovery.
allModels.push(...META_MUSE_STATIC_MODELS);
// Bedrock Mantle has no catalog endpoint used by generation.
allModels.push(...BEDROCK_MANTLE_STATIC_MODELS);
// Seed Sakana's documented Fugu models so the provider is usable when
// catalog generation has no live API key. If live `/v1/models` succeeds,
// Sakana is authoritative and stale seed IDs must stay out.
@@ -643,6 +647,7 @@ async function generateModels() {
allModels = dropUnusableZaiContextTierIds(allModels);
allModels = dropXiaomiAudioOnlyIds(allModels);
allModels = dropUnsupportedBedrockGeoIds(allModels);
allModels = dropBedrockMantleOpenAIModels(allModels);
allModels = normalizeAntigravityEndpoint(allModels);
// Normalize display names: gateway author prefixes ("OpenAI: …"), alias
// markers ("(latest)"), provider attribution ("(Antigravity)"), and