Skip to content

Fix chat completion parse issue#283

Merged
VisargD merged 1 commit intoPortkey-AI:mainfrom
bhishmendramahala-crypto:fix/chatcomplettion_parse_issue
Feb 19, 2026
Merged

Fix chat completion parse issue#283
VisargD merged 1 commit intoPortkey-AI:mainfrom
bhishmendramahala-crypto:fix/chatcomplettion_parse_issue

Conversation

@bhishmendramahala-crypto
Copy link
Copy Markdown

Summary

Fixes the implementation of chat.completions.parse() so it uses the chat completions API instead of the response API when parsing completions.

Problem

When users called client.chat.completions.parse() (e.g. for response format / structured outputs), the SDK was delegating to the response API. That mismatch could lead to incorrect or inconsistent parsing for chat completion responses.

Solution

parse() now delegates to OAIclient.chat.completions.parse(body, opts) instead of the response API. Calls to chat.completions.parse with a response format are now handled by the correct chat completions API.

Changes

  • src/apis/chatCompletions.ts: Updated the parse method to use chat.completions.parse on the OpenAI client instead of the response API.

@bhishmendramahala-crypto bhishmendramahala-crypto force-pushed the fix/chatcomplettion_parse_issue branch from 794a9c9 to b6d32e5 Compare February 17, 2026 14:22
@VisargD VisargD merged commit 9a87de4 into Portkey-AI:main Feb 19, 2026
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