mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-29 01:42:21 +00:00
Splits the OpenAI Chat Completions wire/translate/request/response/stream layer out of openai_compatible.rs into a new providers/openai_chat/ submodule (wire, translate, request, response, stream, hooks). The shared module exposes pub(crate) complete() and stream() entry points that accept a ChatHooks struct of optional fn pointers, letting future adapters (OpenRouter) layer provider-specific behavior on top without duplicating the wire layer. openai_compatible.rs shrinks from 1649 to 227 lines: the ProviderAdapter impl is now a one-line delegator passing ChatHooks::NONE, which is behaviorally identical to the pre-refactor code path. No behavior change. All 392 lib tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| crates | ||
| packages/fabro-api-client | ||