Skip to content

Conversation

@hiibolt
Copy link
Contributor

@hiibolt hiibolt commented Feb 28, 2025

Fixes issue mentioned in #340

@irbull
Copy link

irbull commented Mar 1, 2025

I can confirm that if I use curl to access the create run endpoint, it also returns default-2024-08-21 which appears to be different from what the docs say. Since this appears to be an undocumented change, what do you think about using an alias instead of a rename, and supporting both default-2024-08-21 and default_2024_08_21. Just in case they break their API again.

Something like:

pub enum FileSearchRanker {
    #[serde(rename = "auto")]
    Auto,
    #[serde(alias = "default_2024_08_21")]
    #[serde(alias = "default-2024-08-21")]
    Default2024_08_21,
}

@hiibolt
Copy link
Contributor Author

hiibolt commented Mar 3, 2025

I can confirm that if I use curl to access the create run endpoint, it also returns default-2024-08-21 which appears to be different from what the docs say. Since this appears to be an undocumented change, what do you think about using an alias instead of a rename, and supporting both default-2024-08-21 and default_2024_08_21. Just in case they break their API again.

Something like:

pub enum FileSearchRanker {
    #[serde(rename = "auto")]
    Auto,
    #[serde(alias = "default_2024_08_21")]
    #[serde(alias = "default-2024-08-21")]
    Default2024_08_21,
}

I agree, I will link a commit tonight.

@hiibolt
Copy link
Contributor Author

hiibolt commented Mar 3, 2025

@64bit Could you look this change over? Because of the unprompted and undocumented spec change by OpenAI, crates currently depending on using the Assistants API fail even if they do not directly use this struct

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.

2 participants