diff --git a/changelog/unreleased/context-window-passthrough.md b/changelog/unreleased/context-window-passthrough.md
new file mode 100644
index 00000000..2c6f5896
--- /dev/null
+++ b/changelog/unreleased/context-window-passthrough.md
@@ -0,0 +1,11 @@
+### English
+
+- Chat requests no longer receive a cli2api-chosen context window. Only a context window supplied by the client is forwarded; catalog context limits, including each model's maximum context, are display-only. Trae max mode is likewise forwarded only when the client asks for it.
+- The console no longer stores a per-model context window and no longer exposes the Trae/Qoder max-mode switches. Installations that had set them stop applying those values after upgrade; no stored setting is migrated.
+- Align reasoning conversion with CC Switch conventions: accept `ultra` as the deepest tier and normalize Anthropic thinking budgets into the catalog-driven reasoning ladder.
+
+### 中文
+
+- 聊天请求不再由 cli2api 约定上下文窗口;只透传客户端传入的上下文窗口。目录中的上下文上限(包括每个模型的最大上下文窗口)仅作展示。Trae 的最大档位同样只按客户端请求透传。
+- 控制台不再保存“每个模型的上下文窗口”,也不再提供 Trae/Qoder 最大档开关。已经设置过这些值的实例升级后不再生效,且不会迁移已存配置。
+- 推理转换对齐 CC Switch 约定:接受 `ultra` 作为最深档,并把 Anthropic thinking budget 归一化到由 catalog 驱动的推理档位。
diff --git a/changelog/unreleased/cross-provider-model-pool.md b/changelog/unreleased/cross-provider-model-pool.md
new file mode 100644
index 00000000..4e3386f5
--- /dev/null
+++ b/changelog/unreleased/cross-provider-model-pool.md
@@ -0,0 +1,13 @@
+### English
+
+- Added a "Cross-provider model pool" page between Models and Access. It appears only while the existing cross-provider model pool setting is enabled, and toggling that setting updates the navigation immediately.
+- You can now define logical models that aggregate multiple real provider models behind one client-facing ID, for both same-named models across providers and differently named models. Each logical model has its own routing strategy (priority order, round robin, fill first, or FEFO), failover settings, and an ordered, weighted member list.
+- `/v1/models` now exposes the logical IDs instead of the aggregated per-provider entries; member capabilities are merged conservatively. Logical models are served through the existing route loop and failover/cooldown system, with cooldowns recorded against the real member model. The per-model strategy (priority order by default, round robin, fill first, FEFO) and member weights are honored during routing; priority order keeps using the first healthy member and falls through on failure.
+- Each API key now has its own "Model aggregation mode" switch in the create/edit dialog. When on, the provider cards are greyed out and the key stores only the aggregation grant, so it can call logical models but cannot pin or directly use real provider models; when off, the key keeps its normal provider selection. Key cards show "Model aggregation mode" instead of a provider list for such keys.
+
+### 中文
+
+- 在“模型”和“接入与调试”之间新增“跨 Provider 模型池”页面;仅当现有的跨 Provider 模型池开关开启时出现,切换开关后导航会立即更新。
+- 现在可以定义逻辑模型,把多个真实供应商模型聚合到同一个客户端 ID 下,既支持跨供应商的同名模型,也支持不同名称的模型。每个逻辑模型都可以单独配置路由策略(优先级顺序、轮询、优先填满或 FEFO)、故障转移规则,以及有序带权重的成员列表。
+- `/v1/models` 现在返回聚合后的逻辑 ID,而不再展示被聚合的逐供应商条目;成员能力按保守方式合并。逻辑模型复用现有选路与故障转移/冷却体系,冷却记录在真实成员模型上。每个逻辑模型的策略和成员权重现在真正参与选路;优先级顺序会持续使用第一个健康成员并在失败时顺延,未配置时默认按优先级顺序。
+- 每个 API 密钥在创建/编辑弹窗中新增“模型聚合模式”开关:开启后供应商卡片变灰不可选,密钥仅保存聚合授权,可调用逻辑模型但不能固定或直接使用真实供应商模型;关闭时维持原有供应商选择。此类密钥在卡片上显示“模型聚合模式”而非供应商列表。
diff --git a/changelog/unreleased/model-availability-check.md b/changelog/unreleased/model-availability-check.md
new file mode 100644
index 00000000..ed56effb
--- /dev/null
+++ b/changelog/unreleased/model-availability-check.md
@@ -0,0 +1,11 @@
+### English
+
+- Added a one-click model availability check on the Models page. It sends one minimal 1-token, thinking-disabled live request per model per available account, then reports per-account reachability and latency without changing routing cooldowns or the Usage page totals; each probe still consumes one real 1-token upstream request from that account's quota.
+- The Models page status column now shows the latest availability result instead of custom/default settings, and the action column is labeled Model details.
+- Removed the console reasoning-strength default selector. The Models page now shows the maximum context, the reasoning levels each model actually declares, and image input capability.
+
+### 中文
+
+- 模型页新增一键可通性检查:对“每个模型 × 每个可用账号”发送一次仅 1 token、关闭思考的真实请求,返回逐账号可通状态与延迟,且不会改变路由冷却状态或用量页统计;每次探测会真实消耗该账号的一次 1 token 上游额度。
+- 模型页状态列改为显示最近一次可通性检查结果,不再显示默认/自定义;操作表头改为“模型详情”。
+- 移除控制台推理强度默认选择器;模型页改为展示最大上下文、每个模型实际声明的思考档位和图片输入能力。
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 30418f5b..ac17d3e8 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -14,6 +14,7 @@ import { SystemPage } from '@/pages/SystemPage'
import { LogsPage } from '@/pages/LogsPage'
import { UsagePage } from '@/pages/UsagePage'
import { KeysPage } from '@/pages/KeysPage'
+import { ModelPoolPage } from '@/pages/ModelPoolPage'
export default function App() {
return (
@@ -29,6 +30,7 @@ export default function App() {
} />
} />
} />
+ } />
} />
} />
} />
diff --git a/frontend/src/api/modelPools.ts b/frontend/src/api/modelPools.ts
new file mode 100644
index 00000000..2f03c7ef
--- /dev/null
+++ b/frontend/src/api/modelPools.ts
@@ -0,0 +1,56 @@
+import { api } from './client'
+
+export type AggregationMember = {
+ id?: number
+ provider: string
+ region?: string
+ model: string
+ priority: number
+ weight: number
+}
+
+export type AggregationRecord = {
+ id: string
+ name: string
+ enabled: boolean
+ strategy: string
+ allow_fallbacks: boolean
+ max_attempts: number
+ members: AggregationMember[]
+ created_at: string
+ updated_at: string
+}
+
+export type AggregationInput = {
+ id?: string
+ name: string
+ enabled?: boolean
+ strategy: string
+ allow_fallbacks?: boolean
+ max_attempts: number
+ members: AggregationMember[]
+}
+
+export function fetchAggregations() {
+ return api<{ object: string; data: AggregationRecord[] }>('/api/aggregations')
+}
+
+export function createAggregation(input: AggregationInput) {
+ return api('/api/aggregations', {
+ method: 'POST',
+ body: JSON.stringify(input),
+ })
+}
+
+export function updateAggregation(id: string, input: Partial) {
+ return api(`/api/aggregations/${encodeURIComponent(id)}`, {
+ method: 'PATCH',
+ body: JSON.stringify(input),
+ })
+}
+
+export function deleteAggregation(id: string) {
+ return api(`/api/aggregations/${encodeURIComponent(id)}`, { method: 'DELETE' })
+}
+
+export const AGGREGATION_STRATEGIES = ['priority', 'round-robin', 'fill-first', 'fefo'] as const
diff --git a/frontend/src/api/overview.ts b/frontend/src/api/overview.ts
index 7966d921..ba562b15 100644
--- a/frontend/src/api/overview.ts
+++ b/frontend/src/api/overview.ts
@@ -175,6 +175,46 @@ export function refreshAccount(accountId: string, options?: { quota?: boolean })
})
}
+export type ModelProbeAccountResult = {
+ account_id: string
+ provider?: string
+ region?: string
+ ok: boolean
+ status?: number
+ code?: string
+ kind?: string
+ message?: string
+ latency_ms: number
+}
+
+export type ModelProbeResult = {
+ model: string
+ ok: boolean
+ account_id?: string
+ provider?: string
+ status?: number
+ code?: string
+ kind?: string
+ message?: string
+ latency_ms: number
+ attempt_count?: number
+ accounts?: ModelProbeAccountResult[]
+}
+
+export type ModelProbeResponse = {
+ results: ModelProbeResult[]
+ summary: { total: number; passed: number; failed: number; skipped: number }
+ elapsed_ms: number
+}
+
+/** Send one minimal token request per model to verify real availability. */
+export function checkModels(models?: string[]) {
+ return api('/api/models/check', {
+ method: 'POST',
+ body: JSON.stringify(models?.length ? { models } : {}),
+ })
+}
+
export function testChat(model: string, content: string, accountId?: string) {
const headers: Record = {}
if (accountId) headers['X-Qoder-Account'] = accountId
diff --git a/frontend/src/api/types.ts b/frontend/src/api/types.ts
index 6243c723..3359c5c0 100644
--- a/frontend/src/api/types.ts
+++ b/frontend/src/api/types.ts
@@ -73,10 +73,12 @@ export type ModelInfo = {
max_output_tokens_max?: number
prompt_max_tokens_max?: number
reasoning_options?: string[]
+ reasoning_option_values?: string[]
reasoning_default?: string
reasoning_effort?: string
reasoning_type?: string
can_disable_thinking?: boolean
+ supports_images?: boolean
}
export type CheckinRecord = {
diff --git a/frontend/src/components/ModelDetailsModal.tsx b/frontend/src/components/ModelDetailsModal.tsx
index f0eb8831..dbcedc30 100644
--- a/frontend/src/components/ModelDetailsModal.tsx
+++ b/frontend/src/components/ModelDetailsModal.tsx
@@ -1,7 +1,8 @@
import { Chip, Modal } from '@heroui/react'
import { X } from '@phosphor-icons/react'
+import type { ReactNode } from 'react'
import type { ModelInfo } from '@/api/types'
-import { modelCreditsText, modelIsFree } from '@/lib/format'
+import { modelIsFree } from '@/lib/format'
import { accountProviderLabel, tieredTraeCaps } from '@/lib/provider'
type Translate = (key: string, vars?: Record) => string
@@ -19,71 +20,76 @@ function formatTokens(value?: number) {
return String(value)
}
+function DetailRow({ label, value }: { label: string; value: ReactNode }) {
+ return (
+
+ {label}
+ {value}
+
+ )
+}
+
export function ModelDetailsModal({ model, t, onClose }: Props) {
if (!model) return null
+ // Show exactly the resolved, catalog-declared levels the gateway accepts.
+ // Do not invent missing tiers from a global vocabulary.
const options = model.reasoning_options || []
- const windowDev = model.catalog_context_length || model.default_context_length || model.context_length
+ const windowDev = model.catalog_context_length || model.default_context_length || model.context_length || 0
const windowMax = model.catalog_context_length_max
- const credits = modelCreditsText(model)
+ // Display-only: show the model's largest catalog-declared window. Chat
+ // requests still carry only the context window supplied by the client.
+ const displayWindow = windowMax && windowMax > windowDev ? windowMax : windowDev
const free = modelIsFree(model)
const provider = String(model.provider || model.owned_by || 'qoder').trim().toLowerCase()
const region = String(model.region || model.regions?.[0] || '').trim().toLowerCase()
const providerLabel = accountProviderLabel(provider, region || undefined, t)
- // Resolve the tier shown for the current max-mode toggle so the ceilings match
- // the selected window instead of lingering on the Max tier after a toggle-off.
const traeTier = provider === 'trae' ? tieredTraeCaps(model) : undefined
+ const imageText = model.supports_images === true
+ ? t('imageInputDeclared')
+ : model.supports_images === false
+ ? t('imageInputUnsupported')
+ : t('imageInputNotDeclared')
+ const promptMax = traeTier?.prompt_max_tokens || model.prompt_max_tokens
+ const outputMax = traeTier?.max_output_tokens || model.max_output_tokens
return (
{ if (!next) onClose() }}>
-