diff --git a/backend/internal/domain/audit/pricing.go b/backend/internal/domain/audit/pricing.go index 56ddb8bc..b36d5b86 100644 --- a/backend/internal/domain/audit/pricing.go +++ b/backend/internal/domain/audit/pricing.go @@ -55,7 +55,7 @@ func buildOfficialTokenPrices() map[string]tokenPrice { } register("grok-build-0.1", tokenPrice{InputTicks: 10000, CachedInputTicks: 2000, OutputTicks: 20000, LongContextTokens: 200000, LongInputTicks: 20000, LongCachedTicks: 4000, LongOutputTicks: 40000}, "grok-code-fast-1", "grok-code-fast", "grok-code-fast-1-0825", "grok-composer-2.5-fast") - register("grok-4.5", tokenPrice{InputTicks: 20000, CachedInputTicks: 5000, OutputTicks: 60000, LongContextTokens: 200000, LongInputTicks: 40000, LongCachedTicks: 10000, LongOutputTicks: 120000}, + register("grok-4.5", tokenPrice{InputTicks: 20000, CachedInputTicks: 3000, OutputTicks: 60000, LongContextTokens: 200000, LongInputTicks: 40000, LongCachedTicks: 6000, LongOutputTicks: 120000}, "grok-4.5-latest", "grok-build-latest") standard := tokenPrice{InputTicks: 12500, CachedInputTicks: 2000, OutputTicks: 25000, LongContextTokens: 200000, LongInputTicks: 25000, LongCachedTicks: 4000, LongOutputTicks: 50000} register("grok-4.3", standard, "grok-4.3-latest", "grok-latest") diff --git a/backend/internal/domain/audit/pricing_test.go b/backend/internal/domain/audit/pricing_test.go index cd0aea0f..8011c1f7 100644 --- a/backend/internal/domain/audit/pricing_test.go +++ b/backend/internal/domain/audit/pricing_test.go @@ -12,7 +12,7 @@ func TestEstimateOfficialCostHandlesCacheAliasesAndLongContext(t *testing.T) { t.Fatalf("composer result = %#v, ok = %v", result, ok) } result, ok = EstimateOfficialCost("grok-4.5", 1_000_000, 200_000, 500_000, 210_000) - if !ok || result.CostInUSDTicks != 94_000_000_000 { + if !ok || result.CostInUSDTicks != 93_200_000_000 { t.Fatalf("long-context result = %#v, ok = %v", result, ok) } result, ok = EstimateOfficialCost("Web/grok-4.5-build-free", 100, 0, 50, 100) @@ -53,7 +53,7 @@ func TestOfficialPricingMatchesPublishedTokenRates(t *testing.T) { inputCost, cachedCost, outputCost int64 }{ {model: "grok-build-0.1", inputCost: 10_000_000_000, cachedCost: 2_000_000_000, outputCost: 20_000_000_000}, - {model: "grok-4.5", inputCost: 20_000_000_000, cachedCost: 5_000_000_000, outputCost: 60_000_000_000}, + {model: "grok-4.5", inputCost: 20_000_000_000, cachedCost: 3_000_000_000, outputCost: 60_000_000_000}, {model: "grok-4.3", inputCost: 12_500_000_000, cachedCost: 2_000_000_000, outputCost: 25_000_000_000}, {model: "grok-4.20-multi-agent-0309", inputCost: 12_500_000_000, cachedCost: 2_000_000_000, outputCost: 25_000_000_000}, {model: "grok-4.20-0309-reasoning", inputCost: 12_500_000_000, cachedCost: 2_000_000_000, outputCost: 25_000_000_000}, diff --git a/frontend/src/features/accounts/account-name-cell.tsx b/frontend/src/features/accounts/account-name-cell.tsx index eb801358..0b88c619 100644 --- a/frontend/src/features/accounts/account-name-cell.tsx +++ b/frontend/src/features/accounts/account-name-cell.tsx @@ -1,4 +1,4 @@ -import { Compass, Handshake, SquareTerminal, VenusAndMars, Webhook, type LucideIcon } from "lucide-react"; +import { Bot, Compass, Handshake, SquareTerminal, VenusAndMars, Webhook, type LucideIcon } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; @@ -59,14 +59,6 @@ export function AccountNameCell({ account }: { account: AccountDTO }) { {account.name} - {account.buildBotFlagged ? ( - - - {t("accounts.botRisk")} - - {t("accounts.botRiskTooltip")} - - ) : null}
@@ -127,6 +119,19 @@ export function AccountNameCell({ account }: { account: AccountDTO }) { ) : null} + {account.buildBotFlagged ? ( + <> +
); diff --git a/frontend/src/features/audits/request-audits-page.tsx b/frontend/src/features/audits/request-audits-page.tsx index cd907217..8c7ccc61 100644 --- a/frontend/src/features/audits/request-audits-page.tsx +++ b/frontend/src/features/audits/request-audits-page.tsx @@ -162,10 +162,10 @@ export function RequestAuditsPage() { {auditsQuery.isPending || (result && result.items.length > 0) ? ( - + - + diff --git a/frontend/src/shared/i18n/index.ts b/frontend/src/shared/i18n/index.ts index b419c971..f8037506 100644 --- a/frontend/src/shared/i18n/index.ts +++ b/frontend/src/shared/i18n/index.ts @@ -685,7 +685,7 @@ const resources = { reasoning: "推理", costUsd: "成本 ${{value}}", sources: "来源 {{count}}", - serverTools: "调用服务端工具 {{count}} 次", + serverTools: "工具调用 {{count}} 次", detailTitle: "请求诊断详情", failedAttemptCount: "{{count}} 次失败", attemptTimeline: "失败尝试", @@ -1158,7 +1158,7 @@ const resources = { reasoning: "Reasoning", costUsd: "Cost ${{value}}", sources: "Sources {{count}}", - serverTools: "Server tools called {{count}} times", + serverTools: "Tool calls {{count}} times", detailTitle: "Request diagnostics", failedAttemptCount: "{{count}} failed", failedAttemptCount_one: "{{count}} failed attempt",