forked from BerriAI/litellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Sofatutor tweaks #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mfittko
wants to merge
36
commits into
v1.80.0-stable
Choose a base branch
from
sofatutor-tweaks
base: v1.80.0-stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…onfiguration updates. Fixed test initialization issues and ensured all tests pass. Updated documentation to reflect changes in logging functionality.
b89f58e to
6c487da
Compare
…enAI exception mapping and parsing. Added functions to parse OpenAI error messages and handle proxy exceptions, improving error logging and response formatting.
…o "moderation" in the moderations endpoint, ensuring accurate logging and call type handling.
…through_endpoint" for improved logging and handling in the audio processing workflow.
…ing context managers, allowing for efficient byte iteration without buffering.
…g for efficient byte iteration without prematurely closing the upstream stream. This change enhances the async audio speech functionality while maintaining compatibility with existing synchronous behavior.
…ing context managers, allowing for efficient byte iteration without buffering.
…g for efficient byte iteration without prematurely closing the upstream stream. This change enhances the async audio speech functionality while maintaining compatibility with existing synchronous behavior.
…leaner test setup in TTS deferred streaming tests
…ehavior and ensure proper streaming iteration
…ction for speech calls and add unit tests for verification
…ng alerts and implement unit test for missing webhook scenario
… payload for cost calculation
- Remove unused 'import openai' from cloud_watch.py - Remove test_assistants_logging test - Update docs to remove Assistants API mentions
b823a4f to
aebbe55
Compare
…jects When using the Responses API with a prompt object, OpenAI returns the instructions field as a list of message objects (expanded from the prompt template) rather than a string. The OpenAI SDK correctly defines this as: instructions: Union[str, List[ResponseInputItem], None] But LiteLLM's ResponsesAPIResponse had: instructions: Optional[str] This caused a Pydantic ValidationError when streaming responses tried to parse ResponseCreatedEvent because it expected a string but received a list. This fix updates the type to accept both formats: instructions: Optional[Union[str, ict[str, Any]]]]List Added tests for: - Non-streaming responses with instructions as list - Non-streaming responses with instructions as string - Streaming events (ResponseCreatedEvent, ResponseInProgressEvent, ResponseCompletedEvent) with instructions as list
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
image_generationtomoderationin the moderations endpoint; change call type fromaudio_speechtopass_through_endpointfor accurate logging/metrics..github/workflows/sofatutor_image.ymland remove other workflows on this branch to keep only the Sofatutor image workflow.Based on PR #4.
Changes
litellm/proxy/proxy_server.pyimage_generation→moderationaudio_speech→pass_through_endpointlitellm/llms/openai/openai.py.github/workflows/sofatutor_image.ymlRationale
Changelog
audio_speech→pass_through_endpointimage_generation→moderationsofatutor_image.yml; move workflowFiles Changed
.github/workflows/sofatutor_image.ymllitellm/llms/openai/openai.pylitellm/proxy/proxy_server.pyNotes