Skip to content

Commit e8d49ee

Browse files
authored
Merge pull request #915 from github/release/0.51.0
Release 0.51.0
2 parents c76f360 + b9dd4b8 commit e8d49ee

2 files changed

Lines changed: 39 additions & 4 deletions

File tree

Core/Sources/ConversationTab/ModeAndModelPicker/ModelManagerUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ extension CopilotModel {
374374
modelPickerCategory: modelPickerCategory,
375375
modelPickerPriceCategory: modelPickerPriceCategory,
376376
reasoningEfforts: capabilities.supports.reasoningEfforts,
377-
supportsReasoningEffortLevel: capabilities.supports.supportsReasoningEffortLevel ?? false
377+
supportsReasoningEffortLevel: capabilities.supports.supportsReasoningEffortLevel
378378
)
379379
}
380380
}

Tool/Sources/ConversationServiceProvider/LSPTypes.swift

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public struct CopilotModel: Codable, Equatable {
4848
public let isChatFallback: Bool
4949
public let capabilities: CopilotModelCapabilities
5050
public let billing: CopilotModelBilling?
51+
public let customModel: CopilotModelCustomModel?
5152
public let degradationReason: String?
5253
public let modelPickerCategory: String?
5354
public let modelPickerPriceCategory: String?
@@ -73,28 +74,62 @@ public struct CopilotModelCapabilitiesLimits: Codable, Equatable {
7374
public struct CopilotModelCapabilitiesSupports: Codable, Equatable {
7475
public let vision: Bool
7576
public let reasoningEfforts: [String]?
76-
public let supportsReasoningEffortLevel: Bool?
77+
public let supportsReasoningEffortLevel: Bool
7778
}
7879

7980
public struct CopilotModelBilling: Codable, Equatable, Hashable {
8081
public let isPremium: Bool
8182
public let multiplier: Float
8283
public let tokenBasedBillingEnabled: Bool?
8384
public let tokenPrices: CopilotModelBillingTokenPrices?
85+
public let promo: CopilotModelBillingPromo?
8486

85-
public init(isPremium: Bool, multiplier: Float, tokenBasedBillingEnabled: Bool? = nil, tokenPrices: CopilotModelBillingTokenPrices? = nil) {
87+
public init(
88+
isPremium: Bool,
89+
multiplier: Float,
90+
tokenBasedBillingEnabled: Bool? = nil,
91+
tokenPrices: CopilotModelBillingTokenPrices? = nil,
92+
promo: CopilotModelBillingPromo? = nil
93+
) {
8694
self.isPremium = isPremium
8795
self.multiplier = multiplier
8896
self.tokenBasedBillingEnabled = tokenBasedBillingEnabled
8997
self.tokenPrices = tokenPrices
98+
self.promo = promo
9099
}
91100
}
92101

93102
public struct CopilotModelBillingTokenPrices: Codable, Equatable, Hashable {
103+
public let batchSize: Int?
104+
public let `default`: CopilotModelTokenPriceTier?
105+
public let longContext: CopilotModelTokenPriceTier?
106+
107+
public var cachePrice: Float? { `default`?.cachePrice ?? longContext?.cachePrice }
108+
public var inputPrice: Float? { `default`?.inputPrice ?? longContext?.inputPrice }
109+
public var outputPrice: Float? { `default`?.outputPrice ?? longContext?.outputPrice }
110+
public var tokenUnit: Int? { batchSize }
111+
}
112+
113+
public struct CopilotModelTokenPriceTier: Codable, Equatable, Hashable {
94114
public let cachePrice: Float?
115+
public let cacheWritePrice: Float?
95116
public let inputPrice: Float?
96117
public let outputPrice: Float?
97-
public let tokenUnit: Int?
118+
public let maxContext: Int?
119+
}
120+
121+
public struct CopilotModelBillingPromo: Codable, Equatable, Hashable {
122+
public let id: String
123+
public let discountPercent: Float
124+
public let endsAt: String
125+
public let message: String
126+
}
127+
128+
public struct CopilotModelCustomModel: Codable, Equatable {
129+
public let keyName: String?
130+
public let ownerName: String?
131+
public let ownerType: String?
132+
public let provider: String?
98133
}
99134

100135
// MARK: ChatModes

0 commit comments

Comments
 (0)