Skip to content

Commit 380d179

Browse files
feat: add new model definitions for Google, OpenAI, and xAI (#213)
* feat: add new model definitions for Google, OpenAI, and xAI * feat: add grok-4.20-beta-0309-non-reasoning model * feat: add gpt-5.4-mini and gpt-5.4-nano models
1 parent 3246627 commit 380d179

4 files changed

Lines changed: 137 additions & 0 deletions

File tree

src/celeste/modalities/images/providers/google/models.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,30 @@
9999
ImageParameter.REFERENCE_IMAGES: ImagesConstraint(max_count=14),
100100
},
101101
),
102+
Model(
103+
id="gemini-3.1-flash-image-preview",
104+
provider=Provider.GOOGLE,
105+
display_name="Nano Banana 2",
106+
operations={Modality.IMAGES: {Operation.GENERATE, Operation.EDIT}},
107+
parameter_constraints={
108+
ImageParameter.ASPECT_RATIO: Choice(
109+
options=[
110+
"1:1",
111+
"2:3",
112+
"3:2",
113+
"3:4",
114+
"4:3",
115+
"4:5",
116+
"5:4",
117+
"9:16",
118+
"16:9",
119+
"21:9",
120+
]
121+
),
122+
ImageParameter.QUALITY: Choice(options=["1K", "2K", "4K"]),
123+
ImageParameter.REFERENCE_IMAGES: ImagesConstraint(max_count=14),
124+
},
125+
),
102126
]
103127

104128
# Unified model list for registration

src/celeste/modalities/text/providers/google/models.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,23 @@
130130
TextParameter.AUDIO: AudioConstraint(),
131131
},
132132
),
133+
Model(
134+
id="gemini-3.1-flash-lite-preview",
135+
provider=Provider.GOOGLE,
136+
display_name="Gemini 3.1 Flash Lite Preview",
137+
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
138+
streaming=True,
139+
parameter_constraints={
140+
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
141+
Parameter.MAX_TOKENS: Range(min=1, max=65536),
142+
TextParameter.THINKING_LEVEL: Choice(options=["low", "high"]),
143+
TextParameter.WEB_SEARCH: Bool(),
144+
TextParameter.CODE_EXECUTION: Bool(),
145+
TextParameter.OUTPUT_SCHEMA: Schema(),
146+
# Media input support
147+
TextParameter.IMAGE: ImagesConstraint(),
148+
TextParameter.VIDEO: VideosConstraint(),
149+
TextParameter.AUDIO: AudioConstraint(),
150+
},
151+
),
133152
]

src/celeste/modalities/text/providers/openai/models.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,70 @@
218218
TextParameter.IMAGE: ImagesConstraint(),
219219
},
220220
),
221+
Model(
222+
id="gpt-5.4",
223+
provider=Provider.OPENAI,
224+
display_name="GPT-5.4",
225+
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
226+
streaming=True,
227+
parameter_constraints={
228+
Parameter.MAX_TOKENS: Range(min=1, max=128000),
229+
TextParameter.THINKING_BUDGET: Choice(
230+
options=["minimal", "low", "medium", "high", "xhigh"]
231+
),
232+
TextParameter.VERBOSITY: Choice(options=["low", "medium", "high"]),
233+
TextParameter.WEB_SEARCH: Bool(),
234+
TextParameter.OUTPUT_SCHEMA: Schema(),
235+
TextParameter.IMAGE: ImagesConstraint(),
236+
},
237+
),
238+
Model(
239+
id="gpt-5.4-pro",
240+
provider=Provider.OPENAI,
241+
display_name="GPT-5.4 Pro",
242+
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
243+
streaming=True,
244+
parameter_constraints={
245+
Parameter.MAX_TOKENS: Range(min=1, max=128000),
246+
TextParameter.THINKING_BUDGET: Choice(
247+
options=["minimal", "low", "medium", "high", "xhigh"]
248+
),
249+
TextParameter.VERBOSITY: Choice(options=["low", "medium", "high"]),
250+
TextParameter.WEB_SEARCH: Bool(),
251+
TextParameter.OUTPUT_SCHEMA: Schema(),
252+
TextParameter.IMAGE: ImagesConstraint(),
253+
},
254+
),
255+
Model(
256+
id="gpt-5.4-mini",
257+
provider=Provider.OPENAI,
258+
display_name="GPT-5.4 Mini",
259+
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
260+
streaming=True,
261+
parameter_constraints={
262+
Parameter.MAX_TOKENS: Range(min=1, max=128000),
263+
TextParameter.THINKING_BUDGET: Choice(
264+
options=["minimal", "low", "medium", "high", "xhigh"]
265+
),
266+
TextParameter.OUTPUT_SCHEMA: Schema(),
267+
TextParameter.IMAGE: ImagesConstraint(),
268+
},
269+
),
270+
Model(
271+
id="gpt-5.4-nano",
272+
provider=Provider.OPENAI,
273+
display_name="GPT-5.4 Nano",
274+
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
275+
streaming=True,
276+
parameter_constraints={
277+
Parameter.MAX_TOKENS: Range(min=1, max=128000),
278+
TextParameter.THINKING_BUDGET: Choice(
279+
options=["minimal", "low", "medium", "high", "xhigh"]
280+
),
281+
TextParameter.OUTPUT_SCHEMA: Schema(),
282+
TextParameter.IMAGE: ImagesConstraint(),
283+
},
284+
),
221285
Model(
222286
id="gpt-4.1",
223287
provider=Provider.OPENAI,

src/celeste/modalities/text/providers/xai/models.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,36 @@
8888
TextParameter.CODE_EXECUTION: Bool(),
8989
},
9090
),
91+
Model(
92+
id="grok-4.20-beta-0309-reasoning",
93+
provider=Provider.XAI,
94+
display_name="Grok 4.20 Beta 0309 Reasoning",
95+
operations={Modality.TEXT: {Operation.GENERATE}},
96+
streaming=True,
97+
parameter_constraints={
98+
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
99+
Parameter.MAX_TOKENS: Range(min=1, max=30000),
100+
TextParameter.WEB_SEARCH: Bool(),
101+
TextParameter.X_SEARCH: Bool(),
102+
TextParameter.CODE_EXECUTION: Bool(),
103+
TextParameter.OUTPUT_SCHEMA: Schema(),
104+
},
105+
),
106+
Model(
107+
id="grok-4.20-beta-0309-non-reasoning",
108+
provider=Provider.XAI,
109+
display_name="Grok 4.20 Beta 0309 Non Reasoning",
110+
operations={Modality.TEXT: {Operation.GENERATE}},
111+
streaming=True,
112+
parameter_constraints={
113+
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
114+
Parameter.MAX_TOKENS: Range(min=1, max=30000),
115+
TextParameter.WEB_SEARCH: Bool(),
116+
TextParameter.X_SEARCH: Bool(),
117+
TextParameter.CODE_EXECUTION: Bool(),
118+
TextParameter.OUTPUT_SCHEMA: Schema(),
119+
},
120+
),
91121
Model(
92122
id="grok-3-mini",
93123
provider=Provider.XAI,

0 commit comments

Comments
 (0)