- apps/gateway: OpenCode→FabriX 통과 중계. 헤더 3종 인증, x-llm-model-id 로 모델 선택, 401 시 Bearer/날것×클라이언트 헤더 재시도, 모델 허용 목록. ABAP_OPENCODE apps_ito 통째 복사 대신 200줄로 - opencode/opencode.fabrix.json.tmpl + render_opencode.py — .env AAF_* 로 렌더 - .env.example AAF 블록(기본 605 Gemma4, TOKEN_PREFIX=bearer). 파서가 줄 끝 # 주석을 값으로 읽던 것 수정 - tests/test_gateway.py 9개(MockTransport) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
26 lines
804 B
Python
26 lines
804 B
Python
"""최상위 URL — 프론트 VITE_API_BASE_URL(/api/v1) 아래에 매닮."""
|
|
|
|
from django.conf import settings
|
|
from django.contrib import admin
|
|
from django.http import JsonResponse
|
|
from django.urls import include, path
|
|
|
|
from apps.accounts.views import MeView
|
|
from common.envelope import envelope
|
|
|
|
|
|
def health(_request):
|
|
return JsonResponse(
|
|
envelope(success=True, status_code=200, data={"app": settings.APP_NAME, "version": settings.APP_VERSION})
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path("admin/", admin.site.urls),
|
|
path("api/v1/health", health),
|
|
path("api/v1/auth/", include("apps.accounts.urls")),
|
|
path("api/v1/users/me", MeView.as_view()),
|
|
path("api/v1/chat/", include("apps.chat.urls")),
|
|
path("", include("apps.gateway.urls")), # /api/ito/* — 사내 LLM(FabriX) 중계
|
|
]
|