@@ -16,6 +16,7 @@ public class CopilotModel {
1616 private String modelFamily ;
1717 private String modelName ;
1818 private String id ;
19+ private String vendor ;
1920 private CopilotModelPolicy modelPolicy ;
2021 private List <String > scopes ;
2122 private boolean preview ;
@@ -26,6 +27,7 @@ public class CopilotModel {
2627 private String degradationReason ;
2728 private String providerName ;
2829 private String modelPickerCategory ;
30+ private String modelPickerPriceCategory ;
2931
3032 /**
3133 * Policy for the model.
@@ -52,27 +54,65 @@ public String toString() {
5254 }
5355 }
5456
57+ /**
58+ * Capabilities limits for the model. All components are optional ({@code null} when the server does not provide a
59+ * value), mirroring the {@code number | undefined} fields in the language-server schema.
60+ */
61+ public record CopilotModelCapabilitiesLimits (Integer maxContextWindowTokens , Integer maxOutputTokens ,
62+ Integer maxInputTokens , Integer maxNonStreamingOutputTokens ) {
63+ @ Override
64+ public String toString () {
65+ ToStringBuilder builder = new ToStringBuilder (this );
66+ builder .append ("maxContextWindowTokens" , maxContextWindowTokens );
67+ builder .append ("maxOutputTokens" , maxOutputTokens );
68+ builder .append ("maxInputTokens" , maxInputTokens );
69+ builder .append ("maxNonStreamingOutputTokens" , maxNonStreamingOutputTokens );
70+ return builder .toString ();
71+ }
72+ }
73+
5574 /**
5675 * Capabilities for the model.
5776 */
58- public record CopilotModelCapabilities (CopilotModelCapabilitiesSupports supports ) {
77+ public record CopilotModelCapabilities (CopilotModelCapabilitiesSupports supports ,
78+ CopilotModelCapabilitiesLimits limits ) {
5979 @ Override
6080 public String toString () {
6181 ToStringBuilder builder = new ToStringBuilder (this );
6282 builder .append ("supports" , supports );
83+ builder .append ("limits" , limits );
84+ return builder .toString ();
85+ }
86+ }
87+
88+ /**
89+ * Per-token prices for the model, returned in USD.
90+ */
91+ public record CopilotModelBillingTokenPrices (Double cachePrice , Double inputPrice , Double outputPrice ,
92+ Double tokenUnit ) {
93+ @ Override
94+ public String toString () {
95+ ToStringBuilder builder = new ToStringBuilder (this );
96+ builder .append ("cachePrice" , cachePrice );
97+ builder .append ("inputPrice" , inputPrice );
98+ builder .append ("outputPrice" , outputPrice );
99+ builder .append ("tokenUnit" , tokenUnit );
63100 return builder .toString ();
64101 }
65102 }
66103
67104 /**
68105 * Billing for the model.
69106 */
70- public record CopilotModelBilling (boolean isPremium , double multiplier ) {
107+ public record CopilotModelBilling (boolean isPremium , double multiplier , boolean tokenBasedBillingEnabled ,
108+ CopilotModelBillingTokenPrices tokenPrices ) {
71109 @ Override
72110 public String toString () {
73111 ToStringBuilder builder = new ToStringBuilder (this );
74112 builder .append ("isPremium" , isPremium );
75113 builder .append ("multiplier" , multiplier );
114+ builder .append ("tokenBasedBillingEnabled" , tokenBasedBillingEnabled );
115+ builder .append ("tokenPrices" , tokenPrices );
76116 return builder .toString ();
77117 }
78118 }
@@ -101,6 +141,14 @@ public void setId(String id) {
101141 this .id = id ;
102142 }
103143
144+ public String getVendor () {
145+ return vendor ;
146+ }
147+
148+ public void setVendor (String vendor ) {
149+ this .vendor = vendor ;
150+ }
151+
104152 public CopilotModelPolicy getModelPolicy () {
105153 return modelPolicy ;
106154 }
@@ -181,6 +229,14 @@ public void setModelPickerCategory(String modelPickerCategory) {
181229 this .modelPickerCategory = modelPickerCategory ;
182230 }
183231
232+ public String getModelPickerPriceCategory () {
233+ return modelPickerPriceCategory ;
234+ }
235+
236+ public void setModelPickerPriceCategory (String modelPickerPriceCategory ) {
237+ this .modelPickerPriceCategory = modelPickerPriceCategory ;
238+ }
239+
184240 @ Override
185241 public boolean equals (Object obj ) {
186242 if (this == obj ) {
@@ -198,14 +254,16 @@ public boolean equals(Object obj) {
198254 && isChatDefault == other .isChatDefault && isChatFallback == other .isChatFallback
199255 && Objects .equals (modelFamily , other .modelFamily ) && Objects .equals (modelName , other .modelName )
200256 && Objects .equals (modelPickerCategory , other .modelPickerCategory )
257+ && Objects .equals (modelPickerPriceCategory , other .modelPickerPriceCategory )
201258 && Objects .equals (modelPolicy , other .modelPolicy ) && preview == other .preview
202- && Objects .equals (providerName , other .providerName ) && Objects .equals (scopes , other .scopes );
259+ && Objects .equals (providerName , other .providerName ) && Objects .equals (scopes , other .scopes )
260+ && Objects .equals (vendor , other .vendor );
203261 }
204262
205263 @ Override
206264 public int hashCode () {
207265 return Objects .hash (billing , capabilities , degradationReason , id , isChatDefault , isChatFallback , modelFamily ,
208- modelName , modelPickerCategory , modelPolicy , preview , providerName , scopes );
266+ modelName , modelPickerCategory , modelPickerPriceCategory , modelPolicy , preview , providerName , scopes , vendor );
209267 }
210268
211269 @ Override
@@ -214,6 +272,7 @@ public String toString() {
214272 builder .append ("modelFamily" , modelFamily );
215273 builder .append ("modelName" , modelName );
216274 builder .append ("id" , id );
275+ builder .append ("vendor" , vendor );
217276 builder .append ("modelPolicy" , modelPolicy );
218277 builder .append ("scopes" , scopes );
219278 builder .append ("preview" , preview );
@@ -224,6 +283,7 @@ public String toString() {
224283 builder .append ("degradationReason" , degradationReason );
225284 builder .append ("providerName" , providerName );
226285 builder .append ("modelPickerCategory" , modelPickerCategory );
286+ builder .append ("modelPickerPriceCategory" , modelPickerPriceCategory );
227287 return builder .toString ();
228288 }
229289
0 commit comments