async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

OpenAI Updated Assistants Schema - Small Fix

Open hiibolt opened this issue 9 months ago • 2 comments

It seems that with the launch of GPT4.5 they made a minor change to some return types:

Error: Failed to retrieve assistant

Caused by:
    failed to deserialize api response: unknown variant `default-2024-08-21`, expected `auto` or `default_2024_08_21` at line 19 column 3

It looks related to this struct, with the only change being using hyphens instead of underscores.

hiibolt avatar Feb 28 '25 22:02 hiibolt

Minimal reproducible:

#[tokio::main]
async fn main() -> Result<()> {
    let client = Client::new();

    // Initialize the assistant
    let assistant = client
        .assistants()
        .retrieve("asst_...")
        .await
        .context("Failed to retrieve assistant")?; // Panics here

    Ok(())
}

hiibolt avatar Feb 28 '25 23:02 hiibolt

+1, I'm hitting this too. However, their docs still mention default_2024_08_21.

https://platform.openai.com/docs/assistants/tools/file-search

ranker - Which ranker to use in determining which chunks to use. The available values are auto, which uses the latest available ranker, and default_2024_08_21.

There have been a number of problems with OpenAI in the past few days with the 4.5 release.

irbull avatar Mar 01 '25 16:03 irbull