Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c950d80
feat: add provider region support for Alibaba
Mar 6, 2026
67a6099
Merge remote-tracking branch 'origin/main' into feat/provider-region-…
Mar 19, 2026
fb1eb46
fix: single region resolution + generic support
Mar 19, 2026
38b7491
fix: region review fixes
Mar 20, 2026
6ceec1c
fix: deduplicate pricing tiers and clean up UI
Mar 20, 2026
9adc60a
feat: extend ProviderRegion with optional overrides
Mar 22, 2026
015f558
feat: regions as separate provider mappings
Mar 22, 2026
34827ae
fix: region-aware provider lookups in chat.ts
Mar 22, 2026
d7b1218
fix: region filtering and type cleanup
Mar 24, 2026
0b7af05
Merge remote-tracking branch 'origin/main' into feat/provider-region-…
Mar 24, 2026
b013475
fix: region-aware validation and routing
Mar 24, 2026
f99dfa9
fix: update Alibaba model pricing and regions
Mar 25, 2026
d134e83
Merge remote-tracking branch 'origin/main' into feat/provider-region-…
Mar 25, 2026
5555813
feat: add region column to admin model mappings
Mar 25, 2026
5cb200c
feat: region routing syntax and e2e expansion
Mar 25, 2026
91e80dd
fix: address CodeRabbit review feedback
Mar 25, 2026
a8237c9
feat: support region filter in TEST_MODELS
Mar 26, 2026
ff3acb3
fix: expand regions in model-level TEST_MODELS filter
Mar 26, 2026
c213f0e
feat: include region in response metadata
Mar 26, 2026
cf6a552
fix: region metadata and scoring for direct provider
Mar 26, 2026
2b08a6c
feat: show region label in model UI
Mar 26, 2026
3f44da5
fix: clean up stale null-region mapping rows
Mar 26, 2026
0f3fe46
feat: show region in model selectors
Mar 26, 2026
d550ad5
fix: include region in model selector entry keys
Mar 26, 2026
eb100d9
feat: region suffix in model names and UI updates
Mar 26, 2026
c5a0dbf
feat: region logging, auto-select, and pricing fixes
Mar 26, 2026
0789d51
feat: add Alibaba cn-beijing models and fix region key resolution
Mar 26, 2026
0fd7098
fix: double region suffix and zero costs for region models
Mar 26, 2026
514ed98
fix: auto-resolve region for single-region models
Mar 26, 2026
dcdd4bf
feat: add flags to load script
steebchen Mar 25, 2026
00f686f
chore: remove cross-env-shell
steebchen Mar 25, 2026
ac2ae5c
feat(gateway): add quartz provider
steebchen Mar 26, 2026
cbfa5bd
fix(models): restrict quartz support
steebchen Mar 26, 2026
5abe3ae
fix(models): add quartz pro preview
steebchen Mar 26, 2026
a4b32aa
refactor(models): inline quartz mappings
steebchen Mar 26, 2026
17e72ce
fix: disable vision for deepseek
steebchen Mar 26, 2026
25e9b24
feat: discount quartz models
steebchen Mar 26, 2026
39aa217
feat: add azure gpt-5.4 mini/nano
steebchen Mar 26, 2026
e9820b1
fix: clear unstable on azure gpt-5.4
steebchen Mar 26, 2026
ed72652
fix: track regional model usage
steebchen Mar 26, 2026
037b2dc
fix: use weighted direct scores
steebchen Mar 26, 2026
76d5002
feat: add novita deepseek v3.2
steebchen Mar 26, 2026
961939d
chore: hide free models by default
steebchen Mar 26, 2026
7554d46
fix: stop inferring free selector models
steebchen Mar 26, 2026
bfa7cc3
fix: respect model instability in selectors
steebchen Mar 26, 2026
7a0d153
fix: show canonical attempt models
steebchen Mar 26, 2026
3d2bbbe
fix: store canonical attempt models
steebchen Mar 26, 2026
4bd3041
fix: drop synthetic region roots
steebchen Mar 26, 2026
d03c499
chore: discount azure gpt-5.4
steebchen Mar 26, 2026
15968a7
fix: format routing prices consistently
steebchen Mar 27, 2026
f66256f
fix: trim direct routing scores
steebchen Mar 27, 2026
044ac8b
fix: route direct providers by region
steebchen Mar 27, 2026
29dbc9f
docs: add routing regions section
steebchen Mar 27, 2026
3b529d6
fix: gate chat image attachments
steebchen Mar 27, 2026
78a1615
fix: accept gemini edit params
steebchen Mar 27, 2026
0cc7a48
chore: merge origin/main
steebchen Mar 27, 2026
f3515f1
fix: avoid activity log prefetch
steebchen Mar 27, 2026
6438858
Revert "fix: avoid activity log prefetch"
steebchen Mar 27, 2026
35c8ed0
Merge remote-tracking branch 'origin/main' into feat/provider-region-…
steebchen Mar 27, 2026
b8d8a49
chore: migrations
steebchen Mar 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/api/src/routes/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4366,6 +4366,7 @@ const modelProviderMappingEntrySchema = z.object({
id: z.string(),
modelId: z.string(),
modelName: z.string(),
region: z.string().nullable(),
providerId: z.string(),
providerName: z.string(),
status: z.string(),
Expand Down Expand Up @@ -4594,6 +4595,7 @@ admin.openapi(getModelProviderMappings, async (c) => {
id: tables.modelProviderMapping.id,
modelId: tables.modelProviderMapping.modelId,
modelName: tables.modelProviderMapping.modelName,
region: tables.modelProviderMapping.region,
providerId: tables.modelProviderMapping.providerId,
providerName: tables.provider.name,
status: tables.modelProviderMapping.status,
Expand Down Expand Up @@ -4644,6 +4646,7 @@ admin.openapi(getModelProviderMappings, async (c) => {
id: r.id,
modelId: r.modelId,
modelName: r.modelName,
region: r.region,
providerId: r.providerId,
providerName: r.providerName,
status: r.status,
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/routes/internal-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const modelProviderMappingSchema = z.object({
modelId: z.string(),
providerId: z.string(),
modelName: z.string(),
region: z.string().nullable(),
inputPrice: z.string().nullable(),
outputPrice: z.string().nullable(),
cachedInputPrice: z.string().nullable(),
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/routes/keys-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const providerKeySchema = z.object({
azure_api_version: z.string().optional(),
azure_deployment_type: z.enum(["openai", "ai-foundry"]).optional(),
azure_validation_model: z.string().optional(),
alibaba_region: z.string().optional(),
})
.nullable(),
status: z.enum(["active", "inactive", "deleted"]).nullable(),
Expand Down Expand Up @@ -60,6 +61,7 @@ const createProviderKeySchema = z.object({
azure_api_version: z.string().optional(),
azure_deployment_type: z.enum(["openai", "ai-foundry"]).optional(),
azure_validation_model: z.string().optional(),
alibaba_region: z.string().optional(),
})
.optional(),
organizationId: z.string().min(1, "Organization ID is required"),
Expand Down
6 changes: 6 additions & 0 deletions apps/code/src/lib/api/v1.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2931,6 +2931,7 @@ export interface paths {
id: string;
modelId: string;
modelName: string;
region: string | null;
providerId: string;
providerName: string;
status: string;
Expand Down Expand Up @@ -3672,6 +3673,7 @@ export interface paths {
/** @enum {string} */
azure_deployment_type?: "openai" | "ai-foundry";
azure_validation_model?: string;
alibaba_region?: string;
} | null;
/** @enum {string|null} */
status: "active" | "inactive" | "deleted" | null;
Expand Down Expand Up @@ -3707,6 +3709,7 @@ export interface paths {
/** @enum {string} */
azure_deployment_type?: "openai" | "ai-foundry";
azure_validation_model?: string;
alibaba_region?: string;
};
organizationId: string;
};
Expand Down Expand Up @@ -3735,6 +3738,7 @@ export interface paths {
/** @enum {string} */
azure_deployment_type?: "openai" | "ai-foundry";
azure_validation_model?: string;
alibaba_region?: string;
} | null;
/** @enum {string|null} */
status: "active" | "inactive" | "deleted" | null;
Expand Down Expand Up @@ -3851,6 +3855,7 @@ export interface paths {
/** @enum {string} */
azure_deployment_type?: "openai" | "ai-foundry";
azure_validation_model?: string;
alibaba_region?: string;
} | null;
/** @enum {string|null} */
status: "active" | "inactive" | "deleted" | null;
Expand Down Expand Up @@ -6983,6 +6988,7 @@ export interface operations {
modelId: string;
providerId: string;
modelName: string;
region: string | null;
inputPrice: string | null;
outputPrice: string | null;
cachedInputPrice: string | null;
Expand Down
19 changes: 14 additions & 5 deletions apps/gateway/src/chat-helpers.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
providers,
getConcurrentTestOptions,
getTestOptions,
expandAllProviderRegions,
} from "@llmgateway/models";

import {
Expand Down Expand Up @@ -192,14 +193,18 @@ export const testModels = filteredModels
// test root model without a specific provider
testCases.push({
model: model.id,
providers: model.providers.filter(
(provider: ProviderModelMapping) => provider.test !== "skip",
),
providers: expandAllProviderRegions(
model.providers as ProviderModelMapping[],
).filter((provider: ProviderModelMapping) => provider.test !== "skip"),
});
}

// Create entries for provider-specific requests using provider/model format
for (const provider of model.providers as ProviderModelMapping[]) {
// Expand regions so each provider:region combo becomes a separate test case
const expandedProviders = expandAllProviderRegions(
model.providers as ProviderModelMapping[],
);
for (const provider of expandedProviders) {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
// Skip deactivated provider mappings
if (provider.deactivatedAt && new Date() > provider.deactivatedAt) {
continue;
Expand Down Expand Up @@ -281,7 +286,11 @@ export const providerModels = filteredModels
.flatMap((model) => {
const testCases = [];

for (const provider of model.providers as ProviderModelMapping[]) {
// Expand regions so each provider:region combo becomes a separate test case
const expandedProviders = expandAllProviderRegions(
model.providers as ProviderModelMapping[],
);
for (const provider of expandedProviders) {
// Skip deactivated provider mappings
if (provider.deactivatedAt && new Date() > provider.deactivatedAt) {
continue;
Expand Down
Loading
Loading