feat(backend): 사내 LLM(FabriX) 게이트웨이 /api/ito + OpenCode FabriX 설정 렌더

- 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>
This commit is contained in:
lee-hyeon-cheol
2026-09-17 16:34:53 +09:00
co-authored by Claude Fable 5.1
parent 47d31dbe06
commit 435952f25c
14 changed files with 620 additions and 1 deletions
@@ -0,0 +1,25 @@
{
"$schema": "https://opencode.ai/config.json",
"disabled_providers": ["opencode", "anthropic", "openrouter", "openai", "google"],
"provider": {
"gateway": {
"npm": "@ai-sdk/openai-compatible",
"name": "FabriX",
"options": {
"baseURL": "http://127.0.0.1:${BACKEND_PORT}/api/ito",
"apiKey": "${AAF_GATEWAY_KEY}"
},
"models": ${AAF_FABRIX_MODELS_JSON}
}
},
"model": "gateway/${AAF_FABRIX_DEFAULT_MODEL}",
"tools": { "question": false },
"mcp": {
"sap-icf": {
"type": "remote",
"url": "{env:SAP_MCP_URL}",
"headers": { "Authorization": "Bearer {env:SAP_MCP_KEY}" },
"enabled": false
}
}
}