Conversation
- Add lint, build_tests, license_tests, pip_audit workflows (@dev) - Add docs/, QUICK_FACTS.md, FAQ.md, AUDIT.md, SUGGESTIONS.md, MAINTENANCE_REPORT.md - Migrate setup.py -> pyproject.toml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Anthropic Claude, Google Gemini, Cohere, HuggingFace TGI, and AWS
Bedrock-compatible endpoints, plus OpenAI /models & /embeddings stubs
and Ollama /api/show, /api/ps, /api/pull, /api/push, /api/embeddings.
New files:
- schemas/anthropic.py, schemas/gemini.py: Pydantic schemas with Field constraints
- anthropic.py: POST /v1/messages with SSE streaming (Anthropic format)
- gemini.py: POST /v1beta/models/{id}:generateContent + :streamGenerateContent
- cohere.py: POST /v1/chat, /v1/generate, /v1/embed
- huggingface_tgi.py: POST /generate, /generate_stream, GET /info, /health
- aws_bedrock.py: POST /model/{id}/invoke, /invoke-with-response-stream,
/model/{id}/converse; multi-model response normalisation by model prefix
Modified files:
- chat.py: add GET /v1/models, POST /v1/embeddings; fix response_model=None
on streaming routes; fix Python 3.11 f-string nested dict literals
- ollama.py: add GET /api/show, /api/ps; POST /api/pull, /api/push,
/api/embeddings; typed Pydantic request schemas; response_model=None
test/unittests/test_compat_routers.py: 29 tests, all passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each compat router now mounts under a prefix that identifies the API vendor: /v1/... OpenAI (chat_router — unchanged) /api/... Ollama (ollama_router — unchanged) /anthropic/v1/... Anthropic Claude (was /v1 — conflicted with OpenAI) /gemini/v1beta/... Google Gemini /cohere/v1/... Cohere (was /v1 — conflicted with OpenAI /v1/chat) /tgi/... HuggingFace TGI /bedrock/model/... AWS Bedrock (was /model — now scoped) Benefits: all routers coexist in one FastAPI app with no path conflicts; Swagger UI groups endpoints clearly by vendor tag + prefix. Fix Python 3.11 f-string nested dict literals in chat.py (used temp vars). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cy paths with deprecation OpenAI and Ollama routers now mount under vendor-namespaced prefixes: /openai/v1/... (was /v1/...) /ollama/api/... (was /api/...) Legacy paths (/v1/... and /api/...) are preserved via register_deprecated_routes() which re-mounts the same route handlers at the old paths with deprecated=True. An HTTP middleware (add_deprecation_middleware()) injects response headers on every request to a legacy path: Deprecation: true Link: </openai/v1/...>; rel="successor-version" This gives clients a clear migration signal without breaking existing integrations. New file: ovos_persona_server/deprecated_routers.py test: 31 passing (4 new tests for deprecated path behaviour) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The bots have finished their work. Take a look! 🤖I've aggregated the results of the automated checks for this PR below. 🔍 LintAnother piece of the puzzle! 🧩 ❌ ruff: issues found — see job log 🔨 Build TestsEverything is bolted down and ready to go. 🔩 ✅ All versions pass
⚖️ License CheckVerifying the source of all binary files. 💾 ✅ No license violations found (52 packages). License distribution: 14× MIT, 11× MIT License, 6× Apache Software License, 5× Apache-2.0, 3× BSD-3-Clause, 2× ISC License (ISCL), 2× PSF-2.0, 2× Python Software Foundation License, +7 more Full breakdown — 52 packages
Copyright (c) 2022 Phil Ewels Permission is hereby granted, free of charge, to any person obtaining a copy The above copyright notice and this permission notice shall be included in all THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔒 Security (pip-audit)I've checked the security of our API endpoints. 🌐 ✅ No known vulnerabilities found (71 packages scanned). The automation never sleeps, but I might reboot. 💤 |
Adds docs/api-compatibility.md (7 APIs + 2 deprecated, curl examples), docs/deprecation.md, docs/streaming.md, docs/embeddings.md, docs/bedrock-models.md. Updates FAQ.md (20+ Q&As), QUICK_FACTS.md, AUDIT.md, SUGGESTIONS.md, MAINTENANCE_REPORT.md. AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: document all seven canonical and two deprecated API layers exhaustively - Impact: docs/ fully populated, FAQ.md 20+ entries - Verified via: uv run pytest test/ -v (41 passed)
New TestOllamaRouter: tags, chat, show, ps, pull, embeddings (501). New TestDeprecatedOllamaRouter: /api/... returns 200 + Deprecation header. Additional Bedrock converse structure test. AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: validate Ollama router endpoints and /api/... deprecation headers - Impact: 31 → 41 tests - Verified via: uv run pytest test/ -v (41 passed)
AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: Expose OVOS persona via A2A protocol; implement AgentExecutor that bridges Persona.stream() (sync) to async A2A event queue via asyncio.to_thread - Impact: New a2a.py with OVOSPersonaAgentExecutor, _agent_card, create_a2a_application; a2a-sdk is optional - Verified via: 13 unit tests, 95% coverage
AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: Mount A2A Starlette sub-app at /a2a when --a2a-base-url is provided; add optional [a2a] dependency - Impact: create_persona_app gains a2a_base_url param; __main__.py exposes --a2a-base-url flag; pyproject.toml adds [a2a] and [dev] extras
… FAQ AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: Full test coverage without live A2A server; document new A2A endpoint for operators - Impact: 13 tests passing; docs/a2a.md and FAQ.md updated - Verified via: pytest test/unittests/test_a2a.py -v --cov=ovos_persona_server.a2a
AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: Rewrite README with all 8 API surfaces, A2A section, persona config examples, troubleshooting; update docs/index.md with A2A entry; expand docs/a2a.md with endpoints, curl examples, streaming, multi-turn, architecture; update FAQ.md with A2A section - Impact: README.md rewritten; docs/index.md and docs/a2a.md updated; FAQ.md expanded
No description provided.