Add support for OpenAI GPT-4.1 models (#28708)
Release Notes: - Add support for OpenAI GPT-4.1 via Copilot Chat and OpenAI API --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
parent
6db29eb90a
commit
84aa480344
4 changed files with 32 additions and 0 deletions
|
@ -71,6 +71,12 @@ pub enum Model {
|
|||
FourOmni,
|
||||
#[serde(rename = "gpt-4o-mini", alias = "gpt-4o-mini")]
|
||||
FourOmniMini,
|
||||
#[serde(rename = "gpt-4.1", alias = "gpt-4.1")]
|
||||
FourPointOne,
|
||||
#[serde(rename = "gpt-4.1-mini", alias = "gpt-4.1-mini")]
|
||||
FourPointOneMini,
|
||||
#[serde(rename = "gpt-4.1-nano", alias = "gpt-4.1-nano")]
|
||||
FourPointOneNano,
|
||||
#[serde(rename = "o1", alias = "o1")]
|
||||
O1,
|
||||
#[serde(rename = "o1-preview", alias = "o1-preview")]
|
||||
|
@ -99,6 +105,9 @@ impl Model {
|
|||
"gpt-4-turbo-preview" => Ok(Self::FourTurbo),
|
||||
"gpt-4o" => Ok(Self::FourOmni),
|
||||
"gpt-4o-mini" => Ok(Self::FourOmniMini),
|
||||
"gpt-4.1" => Ok(Self::FourPointOne),
|
||||
"gpt-4.1-mini" => Ok(Self::FourPointOneMini),
|
||||
"gpt-4.1-nano" => Ok(Self::FourPointOneNano),
|
||||
"o1" => Ok(Self::O1),
|
||||
"o1-preview" => Ok(Self::O1Preview),
|
||||
"o1-mini" => Ok(Self::O1Mini),
|
||||
|
@ -114,6 +123,9 @@ impl Model {
|
|||
Self::FourTurbo => "gpt-4-turbo",
|
||||
Self::FourOmni => "gpt-4o",
|
||||
Self::FourOmniMini => "gpt-4o-mini",
|
||||
Self::FourPointOne => "gpt-4.1",
|
||||
Self::FourPointOneMini => "gpt-4.1-mini",
|
||||
Self::FourPointOneNano => "gpt-4.1-nano",
|
||||
Self::O1 => "o1",
|
||||
Self::O1Preview => "o1-preview",
|
||||
Self::O1Mini => "o1-mini",
|
||||
|
@ -129,6 +141,9 @@ impl Model {
|
|||
Self::FourTurbo => "gpt-4-turbo",
|
||||
Self::FourOmni => "gpt-4o",
|
||||
Self::FourOmniMini => "gpt-4o-mini",
|
||||
Self::FourPointOne => "gpt-4.1",
|
||||
Self::FourPointOneMini => "gpt-4.1-mini",
|
||||
Self::FourPointOneNano => "gpt-4.1-nano",
|
||||
Self::O1 => "o1",
|
||||
Self::O1Preview => "o1-preview",
|
||||
Self::O1Mini => "o1-mini",
|
||||
|
@ -146,6 +161,9 @@ impl Model {
|
|||
Self::FourTurbo => 128_000,
|
||||
Self::FourOmni => 128_000,
|
||||
Self::FourOmniMini => 128_000,
|
||||
Self::FourPointOne => 1_047_576,
|
||||
Self::FourPointOneMini => 1_047_576,
|
||||
Self::FourPointOneNano => 1_047_576,
|
||||
Self::O1 => 200_000,
|
||||
Self::O1Preview => 128_000,
|
||||
Self::O1Mini => 128_000,
|
||||
|
@ -173,6 +191,9 @@ impl Model {
|
|||
| Self::FourTurbo
|
||||
| Self::FourOmni
|
||||
| Self::FourOmniMini
|
||||
| Self::FourPointOne
|
||||
| Self::FourPointOneMini
|
||||
| Self::FourPointOneNano
|
||||
| Self::O1
|
||||
| Self::O1Preview
|
||||
| Self::O1Mini => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue