Skip to content

Add OpenAI chat completion wire mapping - #279

Open
happylinks wants to merge 1 commit into
subscription-gateway-pool-policyfrom
subscription-gateway-openai-wire
Open

happylinks wants to merge 1 commit into
subscription-gateway-pool-policyfrom
subscription-gateway-openai-wire

Conversation

@happylinks

Copy link
Copy Markdown
Member

Summary

  • validate the supported OpenAI Chat Completions request subset and reject unsupported fields
  • translate system, developer, user, assistant, tool, and base64 image messages into pi-ai contexts
  • serialize non-streaming completions and SSE chunks with tool-call deltas, finish reasons, usage, errors, and data: [DONE] termination
  • keep reasoning content out of OpenAI assistant content

Testing

  • bun run check
  • 10 focused OpenAI wire tests, 25 package tests in total

Stack 2 of 2, based on #278.

Started by Michiel Westerbeek in this OS session

@open-session-os-tella-dev

open-session-os-tella-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🤖 OS review · approve · confidence 5/5

Safe to merge. The PR validates the intended Chat Completions subset and consistently maps requests, non-streaming responses, streaming deltas, tool calls, usage, and errors to and from pi-ai. I found no merge-blocking correctness or compatibility issues.

💡 Labels: os-adversarial — deeper two-pass review · os-simplify — quality cleanup pass · os-auto-fix — fix anything outstanding and push until CI passes.
Reviewed 035c2cc · GPT-5.6 Sol · earlier reviews collapse above · open session

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
opensession Ready Ready Preview Sep 1, 2026 9:24pm UTC

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.

1 participant