Skip to content

Conversation

@unsync
Copy link
Contributor

@unsync unsync commented Apr 16, 2025

Code Quality bug fix

Author Description

Title:
Some providers had the wrong value for the object field, not a major issue but this replacement makes their responses fully openai compatible.

Title: fix: replace chat_completion by chat.completion in providers responses

🔄 What Changed

  • Updated the object field value from chat_completion to chat.completion in response transformation functions
  • Affected 8 provider files with minimal changes

🔍 Impact of the Change

  • Makes provider responses fully OpenAI compatible
  • Ensures consistent response format across all providers
  • Improves API compatibility for consumers of the gateway

📁 Total Files Changed

  • 8 files modified with 9 additions and 9 deletions
  • All changes are consistent string replacements

🧪 Test Added

  • N/A

🔒 Security Vulnerabilities

  • N/A

Quality Recommendations

  1. Consider adding a simple test case to verify the response format compatibility with OpenAI

  2. Add a comment explaining why 'chat.completion' is the correct format for OpenAI compatibility

@VisargD VisargD merged commit 9645602 into Portkey-AI:main Apr 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants