From b9dd4b85c62e518d05d2864b8d38317e11353005 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 12 Aug 2026 03:59:41 +0000 Subject: [PATCH] Release 0.51.0 --- .../ModelManagerUtils.swift | 2 +- .../LSPTypes.swift | 41 +++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/Core/Sources/ConversationTab/ModeAndModelPicker/ModelManagerUtils.swift b/Core/Sources/ConversationTab/ModeAndModelPicker/ModelManagerUtils.swift index a4542c90..dda65e47 100644 --- a/Core/Sources/ConversationTab/ModeAndModelPicker/ModelManagerUtils.swift +++ b/Core/Sources/ConversationTab/ModeAndModelPicker/ModelManagerUtils.swift @@ -374,7 +374,7 @@ extension CopilotModel { modelPickerCategory: modelPickerCategory, modelPickerPriceCategory: modelPickerPriceCategory, reasoningEfforts: capabilities.supports.reasoningEfforts, - supportsReasoningEffortLevel: capabilities.supports.supportsReasoningEffortLevel ?? false + supportsReasoningEffortLevel: capabilities.supports.supportsReasoningEffortLevel ) } } diff --git a/Tool/Sources/ConversationServiceProvider/LSPTypes.swift b/Tool/Sources/ConversationServiceProvider/LSPTypes.swift index 88b86933..eda80b2c 100644 --- a/Tool/Sources/ConversationServiceProvider/LSPTypes.swift +++ b/Tool/Sources/ConversationServiceProvider/LSPTypes.swift @@ -48,6 +48,7 @@ public struct CopilotModel: Codable, Equatable { public let isChatFallback: Bool public let capabilities: CopilotModelCapabilities public let billing: CopilotModelBilling? + public let customModel: CopilotModelCustomModel? public let degradationReason: String? public let modelPickerCategory: String? public let modelPickerPriceCategory: String? @@ -73,7 +74,7 @@ public struct CopilotModelCapabilitiesLimits: Codable, Equatable { public struct CopilotModelCapabilitiesSupports: Codable, Equatable { public let vision: Bool public let reasoningEfforts: [String]? - public let supportsReasoningEffortLevel: Bool? + public let supportsReasoningEffortLevel: Bool } public struct CopilotModelBilling: Codable, Equatable, Hashable { @@ -81,20 +82,54 @@ public struct CopilotModelBilling: Codable, Equatable, Hashable { public let multiplier: Float public let tokenBasedBillingEnabled: Bool? public let tokenPrices: CopilotModelBillingTokenPrices? + public let promo: CopilotModelBillingPromo? - public init(isPremium: Bool, multiplier: Float, tokenBasedBillingEnabled: Bool? = nil, tokenPrices: CopilotModelBillingTokenPrices? = nil) { + public init( + isPremium: Bool, + multiplier: Float, + tokenBasedBillingEnabled: Bool? = nil, + tokenPrices: CopilotModelBillingTokenPrices? = nil, + promo: CopilotModelBillingPromo? = nil + ) { self.isPremium = isPremium self.multiplier = multiplier self.tokenBasedBillingEnabled = tokenBasedBillingEnabled self.tokenPrices = tokenPrices + self.promo = promo } } public struct CopilotModelBillingTokenPrices: Codable, Equatable, Hashable { + public let batchSize: Int? + public let `default`: CopilotModelTokenPriceTier? + public let longContext: CopilotModelTokenPriceTier? + + public var cachePrice: Float? { `default`?.cachePrice ?? longContext?.cachePrice } + public var inputPrice: Float? { `default`?.inputPrice ?? longContext?.inputPrice } + public var outputPrice: Float? { `default`?.outputPrice ?? longContext?.outputPrice } + public var tokenUnit: Int? { batchSize } +} + +public struct CopilotModelTokenPriceTier: Codable, Equatable, Hashable { public let cachePrice: Float? + public let cacheWritePrice: Float? public let inputPrice: Float? public let outputPrice: Float? - public let tokenUnit: Int? + public let maxContext: Int? +} + +public struct CopilotModelBillingPromo: Codable, Equatable, Hashable { + public let id: String + public let discountPercent: Float + public let endsAt: String + public let message: String +} + +public struct CopilotModelCustomModel: Codable, Equatable { + public let keyName: String? + public let ownerName: String? + public let ownerType: String? + public let provider: String? } // MARK: ChatModes