fix: remove Anthropic-Beta header from non-Anthropic providers to fix identity contamination (#1989)

This commit is contained in:
diegosouzapw
2026-05-06 10:58:01 -03:00
parent 22d562782b
commit e7b5ced09c
4 changed files with 4 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
# Changelog
## [Unreleased]
## [3.8.0] — 2026-05-06
### ✨ New Features

View File

@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: OmniRoute API
version: 3.7.9
version: 3.8.0
description: |
OmniRoute is a local-first AI API proxy router. It provides an OpenAI-compatible
endpoint that routes requests to multiple AI providers with load balancing,

View File

@@ -1,4 +1,4 @@
import { ANTHROPIC_BETA_API_KEY, ANTHROPIC_VERSION_HEADER } from "./anthropicHeaders.ts";
import { ANTHROPIC_VERSION_HEADER } from "./anthropicHeaders.ts";
type JsonRecord = Record<string, unknown>;
@@ -6,7 +6,6 @@ export type GlmApiRegion = "international" | "china";
export const GLM_SHARED_HEADERS = Object.freeze({
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
});
export const GLM_SHARED_MODELS = Object.freeze([

View File

@@ -130,7 +130,6 @@ const KIMI_CODING_SHARED = {
authHeader: "x-api-key",
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
{ id: "kimi-k2.6", name: "Kimi K2.6" },
@@ -793,7 +792,6 @@ export const REGISTRY: Record<string, RegistryEntry> = {
authHeader: "x-api-key",
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
{ id: "qwen3.5-plus", name: "Qwen3.5 Plus" },
@@ -818,7 +816,6 @@ export const REGISTRY: Record<string, RegistryEntry> = {
authHeader: "x-api-key",
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
{ id: "glm-5.1", name: "GLM 5.1" },
@@ -939,7 +936,6 @@ export const REGISTRY: Record<string, RegistryEntry> = {
authHeader: "bearer",
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
// T12/T28: MiniMax default upgraded from M2.5 to M2.7
@@ -961,7 +957,6 @@ export const REGISTRY: Record<string, RegistryEntry> = {
authHeader: "bearer",
headers: {
"Anthropic-Version": ANTHROPIC_VERSION_HEADER,
"Anthropic-Beta": ANTHROPIC_BETA_API_KEY,
},
models: [
// Keep parity with minimax to ensure model discovery works for minimax-cn connections.