diff --git a/Sources/CodexBarCore/Generated/CodexParserHash.generated.swift b/Sources/CodexBarCore/Generated/CodexParserHash.generated.swift index 880bbc3474..06b47c5f31 100644 --- a/Sources/CodexBarCore/Generated/CodexParserHash.generated.swift +++ b/Sources/CodexBarCore/Generated/CodexParserHash.generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/regenerate-codex-parser-hash.sh. Do not edit by hand. enum CodexParserHash { - static let value = "8050a4faf4fddb96" + static let value = "b9a05c82f76634f5" } diff --git a/Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift b/Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift index fdaba8f0e9..8fa3bb244a 100644 --- a/Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift +++ b/Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift @@ -1,5 +1,6 @@ import Foundation +// swiftlint:disable:next type_body_length enum CostUsagePricing { private static let codexPriorityInputTokenLimit = 272_000 static let codexUnattributedModel = "unknown" @@ -18,6 +19,11 @@ enum CostUsagePricing { let outputCostPerTokenAboveThreshold: Double? let cacheReadInputCostPerTokenAboveThreshold: Double? let cacheWriteInputCostPerTokenAboveThreshold: Double? + /// Some models publish only standard rates. Do not infer undocumented cache-write or + /// long-context prices from the standard input rate for those models. + let allowsCacheWriteInputFallback: Bool + let requiresExplicitLongContextPricing: Bool + let hasExplicitLongContextPricing: Bool init( inputCostPerToken: Double, @@ -29,7 +35,10 @@ enum CostUsagePricing { inputCostPerTokenAboveThreshold: Double? = nil, outputCostPerTokenAboveThreshold: Double? = nil, cacheReadInputCostPerTokenAboveThreshold: Double? = nil, - cacheWriteInputCostPerTokenAboveThreshold: Double? = nil) + cacheWriteInputCostPerTokenAboveThreshold: Double? = nil, + allowsCacheWriteInputFallback: Bool = true, + requiresExplicitLongContextPricing: Bool = false, + hasExplicitLongContextPricing: Bool = false) { self.inputCostPerToken = inputCostPerToken self.outputCostPerToken = outputCostPerToken @@ -41,6 +50,9 @@ enum CostUsagePricing { self.outputCostPerTokenAboveThreshold = outputCostPerTokenAboveThreshold self.cacheReadInputCostPerTokenAboveThreshold = cacheReadInputCostPerTokenAboveThreshold self.cacheWriteInputCostPerTokenAboveThreshold = cacheWriteInputCostPerTokenAboveThreshold + self.allowsCacheWriteInputFallback = allowsCacheWriteInputFallback + self.requiresExplicitLongContextPricing = requiresExplicitLongContextPricing + self.hasExplicitLongContextPricing = hasExplicitLongContextPricing } } @@ -189,6 +201,19 @@ enum CostUsagePricing { outputCostPerTokenAboveThreshold: 4.5e-5, cacheReadInputCostPerTokenAboveThreshold: 1e-6, cacheWriteInputCostPerTokenAboveThreshold: 1.25e-5), + // Daybreak aliases may be retargeted. Keep the locally observed canonical Blue model + // separate for analytics while retaining the complete published Sol pricing tuple. + "gpt-daybreak-blue-latest": CodexPricing( + inputCostPerToken: 5e-6, + outputCostPerToken: 3e-5, + cacheReadInputCostPerToken: 5e-7, + displayLabel: nil, + cacheWriteInputCostPerToken: 6.25e-6, + thresholdTokens: 272_000, + inputCostPerTokenAboveThreshold: 1e-5, + outputCostPerTokenAboveThreshold: 4.5e-5, + cacheReadInputCostPerTokenAboveThreshold: 1e-6, + cacheWriteInputCostPerTokenAboveThreshold: 1.25e-5), "gpt-5.6-terra": CodexPricing( inputCostPerToken: 2e-6, outputCostPerToken: 1.2e-5, @@ -211,6 +236,24 @@ enum CostUsagePricing { outputCostPerTokenAboveThreshold: 1.8e-6, cacheReadInputCostPerTokenAboveThreshold: 4e-8, cacheWriteInputCostPerTokenAboveThreshold: 5e-7), + // GPT-5.6 Cyber / Daybreak Red. Public rates only; cache-write, long-context, + // and API Fast are undocumented and stay nil. + "gpt-5.6-cyber": CodexPricing( + inputCostPerToken: 1.25e-5, + outputCostPerToken: 7.5e-5, + cacheReadInputCostPerToken: 1.25e-6, + displayLabel: nil, + allowsCacheWriteInputFallback: false, + requiresExplicitLongContextPricing: true), + // Keep the local canonical Red model distinct for analytics. Public documentation has no + // cache-write, long-context, Priority, or Fast rates for Daybreak Red. + "gpt-daybreak-red-latest": CodexPricing( + inputCostPerToken: 1.25e-5, + outputCostPerToken: 7.5e-5, + cacheReadInputCostPerToken: 1.25e-6, + displayLabel: nil, + allowsCacheWriteInputFallback: false, + requiresExplicitLongContextPricing: true), ] static func codexBuiltInPricingFingerprint() -> String { @@ -232,6 +275,9 @@ enum CostUsagePricing { self.optionalPricingFingerprint(pricing.outputCostPerTokenAboveThreshold), self.optionalPricingFingerprint(pricing.cacheReadInputCostPerTokenAboveThreshold), self.optionalPricingFingerprint(pricing.cacheWriteInputCostPerTokenAboveThreshold), + String(pricing.allowsCacheWriteInputFallback), + String(pricing.requiresExplicitLongContextPricing), + String(pricing.hasExplicitLongContextPricing), self.optionalPricingFingerprint(self.codexAPIFastMultiplier(model: model)), ].joined(separator: "|")) } @@ -517,6 +563,18 @@ enum CostUsagePricing { return "gpt-5.6-sol" } + // Unprefixed API aliases resolve to their documented model. The gpt-prefixed names are + // local Codex canonical identities, retained for separate analytics because aliases may + // be retargeted. + switch trimmed { + case "daybreak-blue-latest": + return "gpt-5.6-sol" + case "daybreak-red-latest": + return "gpt-5.6-cyber" + default: + break + } + if self.codex[trimmed] != nil { return trimmed } @@ -610,6 +668,12 @@ enum CostUsagePricing { ?? lookup.pricing.inputCostPerTokenAboveThreshold ?? lookup.pricing.inputCostPerToken : bundledLongContext?.cacheWriteInputCostPerTokenAboveThreshold) + // Models that require documented long-context pricing must not treat one populated + // dimension as approval to fall back to short-context rates for the remaining buckets. + let hasExplicitLongContextPricing = lookup.pricing.inputCostPerTokenAboveThreshold != nil + && lookup.pricing.outputCostPerTokenAboveThreshold != nil + && lookup.pricing.cacheReadInputCostPerTokenAboveThreshold != nil + && lookup.pricing.cacheCreationInputCostPerTokenAboveThreshold != nil return CodexPricing( inputCostPerToken: lookup.pricing.inputCostPerToken, outputCostPerToken: lookup.pricing.outputCostPerToken, @@ -624,7 +688,11 @@ enum CostUsagePricing { outputCostPerTokenAboveThreshold: lookup.pricing.outputCostPerTokenAboveThreshold ?? bundledLongContext?.outputCostPerTokenAboveThreshold, cacheReadInputCostPerTokenAboveThreshold: cacheReadAboveThreshold, - cacheWriteInputCostPerTokenAboveThreshold: cacheWriteAboveThreshold) + cacheWriteInputCostPerTokenAboveThreshold: cacheWriteAboveThreshold, + allowsCacheWriteInputFallback: lookup.pricing.cacheCreationInputCostPerToken != nil + || (bundled?.allowsCacheWriteInputFallback ?? true), + requiresExplicitLongContextPricing: bundled?.requiresExplicitLongContextPricing ?? false, + hasExplicitLongContextPricing: hasExplicitLongContextPricing) } guard let pricing = self.codex[key] else { return nil } @@ -686,7 +754,12 @@ enum CostUsagePricing { /// Current public API Fast rates normalized against Standard API pricing. These are deliberately /// distinct from ChatGPT/Codex Fast credit multipliers, which do not represent a USD charge. static func codexAPIFastMultiplier(model: String) -> Double? { - switch self.normalizeCodexModel(model) { + // Keep the local Blue identity ineligible even when usage qualifies it with `openai/`. + // The public, unprefixed Daybreak alias deliberately normalizes to Sol instead. + if self.normalizeCodexModel(model) == "gpt-daybreak-blue-latest" { + return nil + } + return switch self.normalizeCodexModel(model) { case "gpt-5.4", "gpt-5.4-mini", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna": 2 case "gpt-5.5": 2.5 default: nil @@ -698,7 +771,7 @@ enum CostUsagePricing { inputTokens: Int, cachedInputTokens: Int, cacheWriteInputTokens: Int = 0, - outputTokens: Int) -> Double + outputTokens: Int) -> Double? { // Codex/OpenAI reports `input_tokens` as the total prompt size, with cached reads as a // SUBSET of it. Cache writes (when tracked separately, e.g. Pi) are also a subset of the @@ -708,9 +781,25 @@ enum CostUsagePricing { let remainingAfterCache = totalInput - cached let cacheWrite = min(max(0, cacheWriteInputTokens), remainingAfterCache) let nonCached = remainingAfterCache - cacheWrite + let usesLongContextRates = pricing.thresholdTokens.map { totalInput > $0 } ?? false + let applicableCacheWriteRate = usesLongContextRates + ? pricing.cacheWriteInputCostPerTokenAboveThreshold ?? pricing.cacheWriteInputCostPerToken + : pricing.cacheWriteInputCostPerToken + if max(0, cacheWriteInputTokens) > 0, + applicableCacheWriteRate == nil, + !pricing.allowsCacheWriteInputFallback + { + return nil + } let cachedRate = pricing.cacheReadInputCostPerToken ?? pricing.inputCostPerToken - let usesLongContextRates = pricing.thresholdTokens.map { totalInput > $0 } ?? false + let unsupportedLongContextThreshold = pricing.thresholdTokens ?? self.codexPriorityInputTokenLimit + if pricing.requiresExplicitLongContextPricing, + totalInput > unsupportedLongContextThreshold, + !pricing.hasExplicitLongContextPricing + { + return nil + } let inputRate = usesLongContextRates ? pricing.inputCostPerTokenAboveThreshold ?? pricing.inputCostPerToken : pricing.inputCostPerToken diff --git a/Tests/CodexBarTests/CostUsagePricingTests.swift b/Tests/CodexBarTests/CostUsagePricingTests.swift index 84dd77ca2a..e51b130c30 100644 --- a/Tests/CodexBarTests/CostUsagePricingTests.swift +++ b/Tests/CodexBarTests/CostUsagePricingTests.swift @@ -2,6 +2,9 @@ import Foundation import Testing @testable import CodexBarCore +// The pricing matrix and its cache fixtures intentionally share one test vocabulary. +// swiftlint:disable file_length +// swiftlint:disable:next type_body_length struct CostUsagePricingTests { @Test func `normalizes codex model variants exactly`() { @@ -19,6 +22,10 @@ struct CostUsagePricingTests { #expect(CostUsagePricing.normalizeCodexModel("openai/gpt-5.6-terra") == "gpt-5.6-terra") #expect(CostUsagePricing.normalizeCodexModel("gpt-5.6-luna") == "gpt-5.6-luna") #expect(CostUsagePricing.normalizeCodexModel("gpt-5.6") == "gpt-5.6-sol") + #expect(CostUsagePricing.normalizeCodexModel("gpt-daybreak-blue-latest") == "gpt-daybreak-blue-latest") + #expect(CostUsagePricing.normalizeCodexModel("gpt-daybreak-red-latest") == "gpt-daybreak-red-latest") + #expect(CostUsagePricing.normalizeCodexModel("daybreak-blue-latest") == "gpt-5.6-sol") + #expect(CostUsagePricing.normalizeCodexModel("daybreak-red-latest") == "gpt-5.6-cyber") // Fictitious dated suffixes only exercise normalize stripping (not released snapshot IDs). #expect(CostUsagePricing.normalizeCodexModel("gpt-5.6-sol-2099-01-01") == "gpt-5.6-sol") #expect(CostUsagePricing.normalizeCodexModel("openai/gpt-5.6-terra-2099-01-01") == "gpt-5.6-terra") @@ -251,6 +258,293 @@ struct CostUsagePricingTests { #expect(alias == sol) } + @Test + func `local daybreak blue preserves its analytics identity and has no API Fast price`() throws { + let root = try Self.cacheRoot() + let shortContext = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-blue-latest", + inputTokens: 100, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + let longContext = CostUsagePricing.codexCostUSD( + model: "daybreak-blue-latest", + inputTokens: 272_001, + cachedInputTokens: 10, + outputTokens: 10, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + let fast = CostUsagePricing.codexPriorityCostUSD( + model: "gpt-daybreak-blue-latest", + inputTokens: 100, + cachedInputTokens: 10, + cacheWriteInputTokens: 20, + outputTokens: 5, + modelsDevCacheRoot: root) + + #expect(shortContext == (70.0 * 5e-6) + (10.0 * 5e-7) + (20.0 * 6.25e-6) + (5.0 * 3e-5)) + #expect(longContext == (271_971.0 * 1e-5) + (10.0 * 1e-6) + (20.0 * 1.25e-5) + (10.0 * 4.5e-5)) + #expect(fast == nil) + #expect(CostUsagePricing.codexAPIFastMultiplier(model: "openai/gpt-daybreak-blue-latest") == nil) + #expect(CostUsagePricing.codexAPIFastMultiplier(model: "daybreak-blue-latest") == 2) + } + + @Test + func `daybreak red rejects undocumented cache write and long context pricing`() throws { + let root = try Self.cacheRoot() + let shortContext = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 100, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + let longContext = CostUsagePricing.codexCostUSD( + model: "daybreak-red-latest", + inputTokens: 272_001, + cachedInputTokens: 10, + outputTokens: 10, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + let fast = CostUsagePricing.codexPriorityCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 100, + cachedInputTokens: 10, + cacheWriteInputTokens: 20, + outputTokens: 5, + modelsDevCacheRoot: root) + + #expect(shortContext == nil) + #expect(longContext == nil) + #expect(fast == nil) + } + + @Test + func `cyber and local daybreak red share documented-only fallback behavior`() throws { + let root = try Self.cacheRoot() + for model in ["gpt-5.6-cyber", "gpt-daybreak-red-latest"] { + #expect(CostUsagePricing.codexCostUSD( + model: model, + inputTokens: 100, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) == nil) + #expect(CostUsagePricing.codexCostUSD( + model: model, + inputTokens: 272_001, + cachedInputTokens: 0, + outputTokens: 5, + modelsDevCacheRoot: root) == nil) + } + } + + @Test + func `exact models dev red pricing supplies only documented dimensions`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-red-latest": { + "id": "gpt-daybreak-red-latest", + "cost": { + "input": 12.5, + "output": 75, + "cache_read": 1.25, + "cache_write": 15.625, + "context_over_200k": { + "input": 25, + "output": 112.5, + "cache_read": 2.5, + "cache_write": 31.25 + } + } + } + } + } + } + """) + + let shortContext = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 100, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + let longContext = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 272_001, + cachedInputTokens: 10, + outputTokens: 10, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + + #expect(shortContext == (70.0 * 12.5e-6) + (10.0 * 1.25e-6) + (20.0 * 15.625e-6) + (5.0 * 75e-6)) + #expect(longContext == (271_971.0 * 25e-6) + (10.0 * 2.5e-6) + (20.0 * 31.25e-6) + (10.0 * 112.5e-6)) + } + + @Test + func `red models dev empty long context block rejects at its resolved threshold`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-red-latest": { + "id": "gpt-daybreak-red-latest", + "cost": { + "input": 12.5, + "output": 75, + "cache_read": 1.25, + "context_over_200k": {} + } + } + } + } + } + """) + + let belowThreshold = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 200_000, + cachedInputTokens: 10, + outputTokens: 5, + modelsDevCacheRoot: root) + let aboveThreshold = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 200_001, + cachedInputTokens: 10, + outputTokens: 5, + modelsDevCacheRoot: root) + + #expect(belowThreshold == (199_990.0 * 12.5e-6) + (10.0 * 1.25e-6) + (5.0 * 75e-6)) + #expect(aboveThreshold == nil) + } + + @Test + func `red models dev partial long context block rejects at its resolved threshold`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-red-latest": { + "id": "gpt-daybreak-red-latest", + "cost": { + "input": 12.5, + "output": 75, + "cache_read": 1.25, + "context_over_200k": { "input": 25 } + } + } + } + } + } + """) + + let aboveThreshold = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 200_001, + cachedInputTokens: 10, + outputTokens: 5, + modelsDevCacheRoot: root) + + #expect(aboveThreshold == nil) + } + + @Test + func `red models dev long context cache write does not require a short context rate`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-red-latest": { + "id": "gpt-daybreak-red-latest", + "cost": { + "input": 12.5, + "output": 75, + "cache_read": 1.25, + "context_over_200k": { + "input": 25, + "output": 112.5, + "cache_read": 2.5, + "cache_write": 31.25 + } + } + } + } + } + } + """) + + let longContext = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-red-latest", + inputTokens: 200_001, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + + #expect(longContext == (199_971.0 * 25e-6) + (10.0 * 2.5e-6) + (20.0 * 31.25e-6) + (5.0 * 112.5e-6)) + } + + @Test + func `daybreak models dev exact aliases override bundled fallback`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-blue-latest": { + "id": "gpt-daybreak-blue-latest", + "cost": { "input": 7, "output": 31, "cache_read": 0.7, "cache_write": 8.75 } + } + } + } + } + """) + + let cost = CostUsagePricing.codexCostUSD( + model: "gpt-daybreak-blue-latest", + inputTokens: 100, + cachedInputTokens: 10, + outputTokens: 5, + cacheWriteInputTokens: 20, + modelsDevCacheRoot: root) + + #expect(cost == (70.0 * 7e-6) + (10.0 * 0.7e-6) + (20.0 * 8.75e-6) + (5.0 * 31e-6)) + } + + @Test + func `provider qualified daybreak blue models dev record takes exact precedence`() throws { + let root = try Self.seedModelsDevCache(""" + { + "openai": { + "id": "openai", + "models": { + "gpt-daybreak-blue-latest": { + "id": "gpt-daybreak-blue-latest", + "cost": { "input": 7, "output": 31 } + } + } + } + } + """) + + let cost = CostUsagePricing.codexCostUSD( + model: "openai/gpt-daybreak-blue-latest", + inputTokens: 100, + cachedInputTokens: 0, + outputTokens: 5, + modelsDevCacheRoot: root) + + #expect(cost == (100.0 * 7e-6) + (5.0 * 31e-6)) + } + @Test func `codex models dev falls back from gpt56 alias to canonical sol pricing`() throws { let canonicalOnlyRoot = try Self.seedModelsDevCache(""" diff --git a/Tests/CodexBarTests/ProviderArchitectureGatekeeperTests.swift b/Tests/CodexBarTests/ProviderArchitectureGatekeeperTests.swift index fd16b9a2eb..2a2a53fe4d 100644 --- a/Tests/CodexBarTests/ProviderArchitectureGatekeeperTests.swift +++ b/Tests/CodexBarTests/ProviderArchitectureGatekeeperTests.swift @@ -3621,7 +3621,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact shared construct dispatches a provider-owned capability at the generic integration boundary."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 222, + line: 265, anchor: "guard let pricing = self.codex[model] else { continue }", expectedProviderIDs: ["codex"], expectedReferenceCount: 1, @@ -3629,7 +3629,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 452, + line: 498, anchor: "static let codexModelsDevProviderID = \"openai\"", expectedProviderIDs: ["deepseek", "openai", "opencode"], expectedReferenceCount: 4, @@ -3637,7 +3637,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 487, + line: 533, anchor: "providerIDs.append(\"opencode\")", expectedProviderIDs: ["opencode"], expectedReferenceCount: 1, @@ -3645,7 +3645,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 520, + line: 578, anchor: "if self.codex[trimmed] != nil {", expectedProviderIDs: ["codex"], expectedReferenceCount: 2, @@ -3653,7 +3653,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 563, + line: 621, anchor: "if self.claude[base] != nil {", expectedProviderIDs: ["claude"], expectedReferenceCount: 1, @@ -3661,7 +3661,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 596, + line: 654, anchor: "let bundled = lookup.pricing.providerID == self.codexModelsDevProviderID ? self.codex[key] : nil", expectedProviderIDs: ["codex"], expectedReferenceCount: 1, @@ -3669,7 +3669,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 630, + line: 698, anchor: "guard let pricing = self.codex[key] else { return nil }", expectedProviderIDs: ["codex"], expectedReferenceCount: 1, @@ -3677,7 +3677,7 @@ struct ProviderArchitectureGatekeeperTests { reason: "This exact cost scanner dispatch selects a provider-owned transcript, cache, or pricing format."), AllowedProviderConstruct( path: "Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift", - line: 773, + line: 862, anchor: "guard let pricing = self.claude[key] else { return nil }", expectedProviderIDs: ["claude"], expectedReferenceCount: 1,