- Create llm_keys.py: GET list (redacted, key_hint only), POST (encrypt + store), DELETE (204 or 404) - LlmKeyResponse never exposes encrypted_key or raw api_key - 409 returned on duplicate (tenant_id, provider) key - Cross-tenant deletion prevented by tenant_id verification in DELETE query - Update api/__init__.py to export llm_keys_router - All 5 LLM key CRUD tests passing (32 total unit tests green)
21 lines
487 B
Python
21 lines
487 B
Python
"""
|
|
Konstruct shared API routers.
|
|
|
|
Import and mount these routers in service main.py files.
|
|
"""
|
|
|
|
from shared.api.billing import billing_router, webhook_router
|
|
from shared.api.channels import channels_router
|
|
from shared.api.llm_keys import llm_keys_router
|
|
from shared.api.portal import portal_router
|
|
from shared.api.usage import usage_router
|
|
|
|
__all__ = [
|
|
"portal_router",
|
|
"channels_router",
|
|
"billing_router",
|
|
"webhook_router",
|
|
"llm_keys_router",
|
|
"usage_router",
|
|
]
|