Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import celeste
text = await celeste.text.generate("Explain quantum computing", model="claude-opus-4-5")
image = await celeste.images.generate("A serene mountain lake at dawn", model="flux-2-pro")
speech = await celeste.audio.speak("Welcome to the future", model="eleven_v3")
video = await celeste.videos.analyze(video_file, prompt="Summarize this clip", model="gemini-3-pro-preview")
video = await celeste.videos.analyze(video_file, prompt="Summarize this clip", model="gemini-3.1-pro-preview")
embeddings = await celeste.text.embed(["lorep ipsum", "dolor sit amet"], model="gemini-embedding-001")
```

Expand Down
35 changes: 0 additions & 35 deletions src/celeste/modalities/images/providers/byteplus/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,6 @@
ImageParameter.WATERMARK: Bool(),
},
),
Model(
id="seedream-4-5-251128",
provider=Provider.BYTEPLUS,
display_name="Seedream 4.5",
operations={Modality.IMAGES: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
ImageParameter.ASPECT_RATIO: Dimensions(
min_pixels=2560 * 1440, # 3,686,400
max_pixels=4096 * 4096, # 16,777,216
min_aspect_ratio=1 / 16,
max_aspect_ratio=16,
presets={
"2K 1:1": "2048x2048",
"2K 3:4": "1728x2304",
"2K 4:3": "2304x1728",
"2K 16:9": "2848x1600",
"2K 9:16": "1600x2848",
"2K 3:2": "2496x1664",
"2K 2:3": "1664x2496",
"2K 21:9": "3136x1344",
"4K 1:1": "4096x4096",
"4K 3:4": "3520x4704",
"4K 4:3": "4704x3520",
"4K 16:9": "5504x3040",
"4K 9:16": "3040x5504",
"4K 2:3": "3328x4992",
"4K 3:2": "4992x3328",
"4K 21:9": "6240x2656",
},
),
ImageParameter.QUALITY: Choice(options=["2K", "4K"]),
ImageParameter.WATERMARK: Bool(),
},
),
Model(
id="seedream-5-0-260128",
provider=Provider.BYTEPLUS,
Expand Down
23 changes: 0 additions & 23 deletions src/celeste/modalities/images/providers/openai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,6 @@
from ...parameters import ImageParameter

MODELS: list[Model] = [
Model(
id="dall-e-2",
provider=Provider.OPENAI,
display_name="DALL-E 2",
operations={Modality.IMAGES: {Operation.GENERATE, Operation.EDIT}},
parameter_constraints={
ImageParameter.ASPECT_RATIO: Choice(
options=["256x256", "512x512", "1024x1024"]
),
},
),
Model(
id="dall-e-3",
provider=Provider.OPENAI,
display_name="DALL-E 3",
operations={Modality.IMAGES: {Operation.GENERATE}},
parameter_constraints={
ImageParameter.ASPECT_RATIO: Choice(
options=["1024x1024", "1792x1024", "1024x1792"]
),
ImageParameter.QUALITY: Choice(options=["standard", "hd"]),
},
),
Model(
id="gpt-image-1",
provider=Provider.OPENAI,
Expand Down
20 changes: 0 additions & 20 deletions src/celeste/modalities/text/providers/google/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,6 @@
TextParameter.DOCUMENT: DocumentsConstraint(),
},
),
Model(
id="gemini-3-pro-preview",
provider=Provider.GOOGLE,
display_name="Gemini 3 Pro",
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=65536),
TextParameter.THINKING_LEVEL: Choice(options=["low", "high"]),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
# Media input support
TextParameter.IMAGE: ImagesConstraint(),
TextParameter.VIDEO: VideosConstraint(),
TextParameter.AUDIO: AudioConstraint(),
TextParameter.DOCUMENT: DocumentsConstraint(),
},
),
Model(
id="gemini-3-flash-preview",
provider=Provider.GOOGLE,
Expand Down
26 changes: 0 additions & 26 deletions src/celeste/modalities/text/providers/groq/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,6 @@
TextParameter.TOOLS: ToolSupport(tools=[]),
},
),
Model(
id="moonshotai/kimi-k2-instruct",
provider=Provider.GROQ,
display_name="Kimi K2 Instruct",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0, step=0.01),
Parameter.MAX_TOKENS: Range(min=1, max=16384, step=1),
TextParameter.OUTPUT_SCHEMA: Schema(),
TextParameter.TOOLS: ToolSupport(tools=[]),
},
),
Model(
id="moonshotai/kimi-k2-instruct-0905",
provider=Provider.GROQ,
display_name="Kimi K2 Instruct 0905",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0, step=0.01),
Parameter.MAX_TOKENS: Range(min=1, max=16384, step=1),
TextParameter.OUTPUT_SCHEMA: Schema(),
TextParameter.TOOLS: ToolSupport(tools=[]),
},
),
Model(
id="meta-llama/llama-4-scout-17b-16e-instruct",
provider=Provider.GROQ,
Expand Down
30 changes: 0 additions & 30 deletions src/celeste/modalities/text/providers/mistral/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,6 @@
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
},
),
Model(
id="open-mistral-7b",
provider=Provider.MISTRAL,
display_name="Open Mistral 7B",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0, step=0.01),
Parameter.MAX_TOKENS: Range(min=1, max=32768, step=1),
TextParameter.OUTPUT_SCHEMA: Schema(),
TextParameter.TOOLS: ToolSupport(tools=[]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
},
),
Model(
id="codestral-latest",
provider=Provider.MISTRAL,
Expand Down Expand Up @@ -159,22 +145,6 @@
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
},
),
Model(
id="pixtral-12b-2409",
provider=Provider.MISTRAL,
display_name="Pixtral 12B",
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0, step=0.01),
Parameter.MAX_TOKENS: Range(min=1, max=32768, step=1),
TextParameter.OUTPUT_SCHEMA: Schema(),
TextParameter.IMAGE: ImagesConstraint(),
TextParameter.DOCUMENT: DocumentsConstraint(),
TextParameter.TOOLS: ToolSupport(tools=[]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
},
),
Model(
id="pixtral-12b-latest",
provider=Provider.MISTRAL,
Expand Down
70 changes: 0 additions & 70 deletions src/celeste/modalities/text/providers/xai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,76 +14,6 @@
from ...parameters import TextParameter

MODELS: list[Model] = [
Model(
id="grok-4-1-fast-reasoning",
provider=Provider.XAI,
display_name="Grok 4.1 Fast Reasoning",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=30000),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, XSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
},
),
Model(
id="grok-4-1-fast-non-reasoning",
provider=Provider.XAI,
display_name="Grok 4.1 Fast Non-Reasoning",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=30000),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, XSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
},
),
Model(
id="grok-4-fast-reasoning",
provider=Provider.XAI,
display_name="Grok 4 Fast Reasoning",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=30000),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, XSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
},
),
Model(
id="grok-4-fast-non-reasoning",
provider=Provider.XAI,
display_name="Grok 4 Fast Non-Reasoning",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=30000),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, XSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
},
),
Model(
id="grok-4-0709",
provider=Provider.XAI,
display_name="Grok 4",
operations={Modality.TEXT: {Operation.GENERATE}},
streaming=True,
parameter_constraints={
Parameter.TEMPERATURE: Range(min=0.0, max=2.0),
Parameter.MAX_TOKENS: Range(min=1, max=64000),
TextParameter.TOOLS: ToolSupport(tools=[WebSearch, XSearch, CodeExecution]),
TextParameter.TOOL_CHOICE: ToolChoiceSupport(),
TextParameter.OUTPUT_SCHEMA: Schema(),
},
),
Model(
id="grok-4.20-beta-0309-reasoning",
provider=Provider.XAI,
Expand Down
38 changes: 1 addition & 37 deletions src/celeste/modalities/videos/providers/byteplus/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Console display names differ from API model IDs.
"""

from celeste.constraints import Choice, ImageConstraint, ImagesConstraint, Range
from celeste.constraints import Choice, ImageConstraint, Range
from celeste.core import Modality, Operation, Provider
from celeste.mime_types import ImageMimeType
from celeste.models import Model
Expand All @@ -22,42 +22,6 @@
]

MODELS: list[Model] = [
Model(
id="seedance-1-0-lite-t2v-250428",
provider=Provider.BYTEPLUS,
operations={Modality.VIDEOS: {Operation.GENERATE}},
display_name="Seedance 1.0 Lite (Text-to-Video)",
parameter_constraints={
VideoParameter.DURATION: Range(min=2, max=12),
VideoParameter.RESOLUTION: Choice(options=["480p", "720p", "1080p"]),
VideoParameter.FIRST_FRAME: ImageConstraint(
supported_mime_types=BYTEPLUS_SUPPORTED_MIME_TYPES,
),
VideoParameter.LAST_FRAME: ImageConstraint(
supported_mime_types=BYTEPLUS_SUPPORTED_MIME_TYPES,
),
},
),
Model(
id="seedance-1-0-lite-i2v-250428",
provider=Provider.BYTEPLUS,
operations={Modality.VIDEOS: {Operation.GENERATE}},
display_name="Seedance 1.0 Lite (Image-to-Video)",
parameter_constraints={
VideoParameter.DURATION: Range(min=2, max=12),
VideoParameter.RESOLUTION: Choice(options=["480p", "720p", "1080p"]),
VideoParameter.REFERENCE_IMAGES: ImagesConstraint(
supported_mime_types=BYTEPLUS_SUPPORTED_MIME_TYPES,
max_count=4,
),
VideoParameter.FIRST_FRAME: ImageConstraint(
supported_mime_types=BYTEPLUS_SUPPORTED_MIME_TYPES,
),
VideoParameter.LAST_FRAME: ImageConstraint(
supported_mime_types=BYTEPLUS_SUPPORTED_MIME_TYPES,
),
},
),
Model(
id="seedance-1-0-pro-250528",
provider=Provider.BYTEPLUS,
Expand Down
4 changes: 0 additions & 4 deletions src/celeste/providers/openai/images/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ async def _make_json_request(
extra_headers: dict[str, str] | None = None,
) -> dict[str, Any]:
"""Make JSON request for generate operations."""
# DALL-E 2/3 need b64_json response format
if self.model.id in ("dall-e-2", "dall-e-3"):
request_body.setdefault("response_format", "b64_json")

headers = self._json_headers(extra_headers)

response = await self.http_client.post(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/images/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@pytest.mark.parametrize(
("provider", "model", "parameters"),
[
(Provider.OPENAI, "dall-e-2", {}),
(Provider.OPENAI, "gpt-image-1-mini", {}),
(Provider.GOOGLE, "imagen-4.0-fast-generate-001", {"num_images": 1}),
(Provider.BYTEPLUS, "seedream-4-0-250828", {}),
(Provider.BFL, "flux-2-pro", {}),
Expand Down
6 changes: 4 additions & 2 deletions tests/integration_tests/text/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
("anthropic", "claude-haiku-4-5"),
("openai", "gpt-4o-mini"),
("google", "gemini-2.5-flash"),
("xai", "grok-4-fast-non-reasoning"),
("xai", "grok-4.20-beta-0309-non-reasoning"),
]

# One cheap model per provider for function tools (user-defined)
Expand Down Expand Up @@ -133,7 +133,9 @@ async def test_function_tool_call(provider: str, model_id: str) -> None:
async def test_xai_x_search() -> None:
"""Test XSearch tool (xAI-only) produces a text response."""
client = create_client(
modality=Modality.TEXT, provider="xai", model="grok-4-fast-non-reasoning"
modality=Modality.TEXT,
provider="xai",
model="grok-4.20-beta-0309-non-reasoning",
)

output = await client.generate(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/videos/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# BytePlus Seedance: min duration 2s, 480p is cheapest
(
Provider.BYTEPLUS,
"seedance-1-0-lite-t2v-250428",
"seedance-1-0-pro-250528",
{"duration": 2, "resolution": "480p"},
),
# xAI Grok Imagine: duration 1-15s, 480p/720p
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_sync_generate() -> None:
client = create_client(
modality=Modality.VIDEOS,
provider=Provider.BYTEPLUS,
model="seedance-1-0-lite-t2v-250428",
model="seedance-1-0-pro-250528",
)

response = client.sync.generate(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_text_modality_analyze_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_moonshot_init_request_includes_image_url_block() -> None:

def test_xai_init_request_includes_input_image_block() -> None:
model = Model(
id="grok-4-0709",
id="grok-4.20-beta-0309-reasoning",
provider=Provider.XAI,
display_name="Grok 4",
operations={Modality.TEXT: {Operation.GENERATE, Operation.ANALYZE}},
Expand Down
Loading