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 src/celeste/providers/anthropic/messages/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
if isinstance(content, dict):
parsed = content
elif isinstance(content, str):
parsed = json.loads(content)
parsed = json.loads(content, strict=False)
else:
parsed = content

Expand Down
2 changes: 1 addition & 1 deletion src/celeste/providers/cohere/chat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
return content

if isinstance(content, str):
parsed = json.loads(content)
parsed = json.loads(content, strict=False)
else:
parsed = content

Expand Down
2 changes: 1 addition & 1 deletion src/celeste/providers/deepseek/chat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
return content

if isinstance(content, str):
parsed = json.loads(content)
parsed = json.loads(content, strict=False)
else:
parsed = content

Expand Down
4 changes: 3 additions & 1 deletion src/celeste/providers/google/generate_content/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
if isinstance(content, list) and content and isinstance(content[0], BaseModel):
return content

parsed = json.loads(content) if isinstance(content, str) else content
parsed = (
json.loads(content, strict=False) if isinstance(content, str) else content
)

# For list[T], handle various formats Google might return
origin = get_origin(value)
Expand Down
4 changes: 3 additions & 1 deletion src/celeste/providers/google/interactions/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
if isinstance(content, list) and content and isinstance(content[0], BaseModel):
return content

parsed = json.loads(content) if isinstance(content, str) else content
parsed = (
json.loads(content, strict=False) if isinstance(content, str) else content
)

# For list[T], handle various formats Google might return
origin = get_origin(value)
Expand Down
4 changes: 3 additions & 1 deletion src/celeste/providers/groq/chat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
if isinstance(content, list) and content and isinstance(content[0], BaseModel):
return content

parsed_json = json.loads(content) if isinstance(content, str) else content
parsed_json = (
json.loads(content, strict=False) if isinstance(content, str) else content
)

# Unwrap list from items wrapper
origin = get_origin(value)
Expand Down
2 changes: 1 addition & 1 deletion src/celeste/providers/mistral/chat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
return content

if isinstance(content, str):
parsed = json.loads(content)
parsed = json.loads(content, strict=False)
else:
parsed = content
return TypeAdapter(value).validate_python(parsed)
Expand Down
2 changes: 1 addition & 1 deletion src/celeste/providers/moonshot/chat/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def parse_output(self, content: TextContent, value: object | None) -> TextConten
return content

if isinstance(content, str):
parsed = json.loads(content)
parsed = json.loads(content, strict=False)
else:
parsed = content

Expand Down
Loading