feat: add OpenAI-compatible gateway

- GET /v1/health, GET /v1/models, POST /v1/chat/completions (streaming + non-streaming)
- OpenAI SDK, LangChain ChatOpenAI, and SSE streaming integration tests
- Tracker-backed GET /v1/models endpoint
- OpenAI-format errors for unavailable model (503) and pipeline failures
- Malformed JSON body handled with 400 instead of crash
- Test deps (openai, langchain-openai) declared in root pyproject dev extras

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dobromir Popov
2026-06-29 01:52:45 +03:00
parent 0199c99f6b
commit 3b7ef2743d
5 changed files with 366 additions and 61 deletions

View File

@@ -9,7 +9,7 @@ description = "Distributed Inference Network monorepo root"
requires-python = ">=3.10"
[project.optional-dependencies]
dev = ["pytest>=8"]
dev = ["pytest>=8", "openai>=1", "langchain-openai>=0.1"]
[tool.pytest.ini_options]
testpaths = ["tests"]