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
3 changes: 2 additions & 1 deletion adalflow/adalflow/components/agent/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,8 @@ async def impl_astream(
else:
# yield the final planner response
if output.error is not None:
if "400" in output.error or "429" in output.error: # context too long or rate limite, not recoverable
if "400" in output.error or "429" or "404" in output.error: # context too long or rate limite, not recoverable
# 404 model not exist
# create a final output item with error and stop the loop
final_output_item = FinalOutputItem(
error=output.error,
Expand Down
12 changes: 12 additions & 0 deletions adalflow/adalflow/components/model_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
OptionalPackages.OPENAI,
)

# Import utils functions directly (not lazy) since they don't have dependencies
from adalflow.components.model_client.utils import (
process_images_for_response_api,
format_content_for_response_api,
parse_embedding_response,
)

__all__ = [
"CohereAPIClient",
"TransformerReranker",
Expand All @@ -116,6 +123,11 @@
"XAIClient",
"FireworksClient",
"SambaNovaClient",
"AzureAIClient",
# Utils functions
"process_images_for_response_api",
"format_content_for_response_api",
"parse_embedding_response",
]

for name in __all__:
Expand Down
Loading
Loading