mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
fix(frontend): only show model mapping when actual model differs from requested model
This commit is contained in:
@@ -543,13 +543,14 @@ function formatApiFormat(format: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取实际使用的模型(优先 target_model,其次 model_version)
|
// 获取实际使用的模型(优先 target_model,其次 model_version)
|
||||||
|
// 只有当实际模型与请求模型不同时才返回,用于显示映射箭头
|
||||||
function getActualModel(record: UsageRecord): string | null {
|
function getActualModel(record: UsageRecord): string | null {
|
||||||
// 优先显示模型映射
|
// 优先显示模型映射
|
||||||
if (record.target_model) {
|
if (record.target_model && record.target_model !== record.model) {
|
||||||
return record.target_model
|
return record.target_model
|
||||||
}
|
}
|
||||||
// 其次显示 Provider 返回的实际版本(如 Gemini 的 modelVersion)
|
// 其次显示 Provider 返回的实际版本(如 Gemini 的 modelVersion)
|
||||||
if (record.request_metadata?.model_version) {
|
if (record.request_metadata?.model_version && record.request_metadata.model_version !== record.model) {
|
||||||
return record.request_metadata.model_version
|
return record.request_metadata.model_version
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user