Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/Cohere/Generated/Cohere.CohereClient.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ partial void ProcessChatv2ResponseContent(
/// <param name="k">
/// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.<br/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// Default Value: 0
/// </param>
/// <param name="logprobs">
/// Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.
Expand Down Expand Up @@ -620,7 +620,7 @@ partial void ProcessChatv2ResponseContent(
global::Cohere.CitationOptions? citationOptions = default,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
float? frequencyPenalty = default,
float? k = default,
int? k = default,
bool? logprobs = default,
int? maxTokens = default,
float? p = default,
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Cohere/Generated/Cohere.ICohereClient.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public partial interface ICohereClient
/// <param name="k">
/// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.<br/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// Default Value: 0
/// </param>
/// <param name="logprobs">
/// Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.
Expand Down Expand Up @@ -123,7 +123,7 @@ public partial interface ICohereClient
global::Cohere.CitationOptions? citationOptions = default,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
float? frequencyPenalty = default,
float? k = default,
int? k = default,
bool? logprobs = default,
int? maxTokens = default,
float? p = default,
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public sealed partial class Chatv2Request
/// <summary>
/// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.<br/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// Default Value: 0
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("k")]
public float? K { get; set; }
public int? K { get; set; }

/// <summary>
/// Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.
Expand Down Expand Up @@ -188,7 +188,7 @@ public sealed partial class Chatv2Request
/// <param name="k">
/// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.<br/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// Default Value: 0
/// </param>
/// <param name="logprobs">
/// Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.
Expand Down Expand Up @@ -274,7 +274,7 @@ public Chatv2Request(
global::Cohere.CitationOptions? citationOptions,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents,
float? frequencyPenalty,
float? k,
int? k,
bool? logprobs,
int? maxTokens,
float? p,
Expand Down
3 changes: 1 addition & 2 deletions src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7412,9 +7412,8 @@ paths:
k:
maximum: 500
minimum: 0
type: number
type: integer
description: "Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.\nDefaults to `0`, min value of `0`, max value of `500`.\n"
format: float
default: 0
x-fern-audiences:
- public
Comment on lines 7412 to 7419
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Replace deprecated float type with integer
This update breaks clients that pass non‐integer values for k. Ensure the old type: number and format: float attributes are fully removed to avoid schema conflicts and treat k exclusively as an integer. Also document this as a breaking change (e.g., bump the API version or note it in the changelog).

Apply this patch if the old definitions still exist above this hunk:

-                  type: number
-                  format: float
+                  type: integer

🏁 Script executed:

#!/bin/bash
# Check for any remaining 'type: number' or 'format: float' in the Cohere OpenAPI spec
rg -n "type: number" src/libs/Cohere/openapi.yaml || echo "No occurrences of 'type: number'"
rg -n "format: float" src/libs/Cohere/openapi.yaml || echo "No occurrences of 'format: float'"

Length of output: 2811


Ensure k uses only integer and document breaking change
The OpenAPI spec still defines k with the deprecated type: number and format: float immediately above the new integer schema (lines 7407–7409), which conflicts with the type: integer at lines 7412–7419 and will break clients sending floats. Remove the old attributes so k is strictly an integer, and note this as a breaking change (bump the API version or add to the changelog).

Affected file: src/libs/Cohere/openapi.yaml
Location: around lines 7407–7409

Apply this patch:

-                  type: number
-                  format: float
+                  type: integer

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/Cohere/openapi.yaml around lines 7407 to 7409, remove the deprecated
'type: number' and 'format: float' attributes for the 'k' parameter to avoid
conflicts with the integer type defined at lines 7412 to 7419. Ensure 'k' is
strictly defined as an integer with the constraints already present.
Additionally, document this as a breaking change by either bumping the API
version or adding a note in the changelog to inform clients about the change in
accepted value types.

Expand Down
Loading