Skip to content

feat: bundle openai as an internal dependency, move to internal self types - #15

Open
Abhinavexist wants to merge 3 commits into
mainfrom
feat/bundle-openai-types
Open

feat: bundle openai as an internal dependency, move to internal self types#15
Abhinavexist wants to merge 3 commits into
mainfrom
feat/bundle-openai-types

Conversation

@Abhinavexist

Copy link
Copy Markdown
Collaborator

openai is no longer a dependency of interfaze. Its runtime is bundled into the published package, and the SDK now owns its public TypeScript types instead of re-exporting openai's. Also adds first-class chat.completions.parse() for zod-validated structured output.

What changed

  • Bundle: tsup noExternal: [/^openai(\/|$)/]; openai moved from dependenciesdevDependencies, pinned exact 6.47.0.
  • Types: new src/_compat.ts — the owned surface; every src/* imports its types from ./_compat.js, not openai.
  • Structured output: interfaze.chat.completions.parse(...) + re-exported zodResponseFormat; returns a typed message.parsed (ParsedChatCompletion<T>).
  • Visibility: internal names carry no openai (_compat.ts, Client); sourcesContent: false keeps openai source out of the published source maps.
  • Docs: README structured-output leads with parse; Errors section notes "import error classes/types from interfaze, not openai."

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