Skip to content

Add support for reasoning_effort and extra_body parameters to ChatCompletionRequest#70

Open
TanKimzeg wants to merge 1 commit into
rellfy:masterfrom
TanKimzeg:master
Open

Add support for reasoning_effort and extra_body parameters to ChatCompletionRequest#70
TanKimzeg wants to merge 1 commit into
rellfy:masterfrom
TanKimzeg:master

Conversation

@TanKimzeg
Copy link
Copy Markdown

@TanKimzeg TanKimzeg commented May 15, 2026

  • reasoning_effort: Constrains inference effort for reasoning-capable models
  • extra_body: Enables passing arbitrary JSON properties not yet typed in the SDK, providing forward compatibility with new API parameters without requiring SDK updates.

Usage:

// Reasoning effort
let req = ChatCompletion::builder("o3-mini", messages)
    .reasoning_effort("high")
    .build()?;

// Extra body
let mut extra = HashMap::new();
extra.insert("custom_param".into(), json!("custom"));
let req = ChatCompletion::builder("gpt-4o", messages)
    .extra_body(extra)
    .build()?;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant