feat: add gateway module with FastAPI server (#5)

* chore: add .claude/ to .gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add gateway module with FastAPI server

- Add new gateway module with FastAPI app for API routing
- Add gateway and serve commands to Makefile
- Add fastapi, httpx, uvicorn, sse-starlette dependencies
- Fix model config retrieval in lead_agent (support both model_name and model)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
DanielWalnut
2026-01-16 13:22:26 +08:00
committed by GitHub
parent 1f03fb3749
commit 7284eb15f1
13 changed files with 1125 additions and 41 deletions

View File

@@ -15,7 +15,7 @@ middlewares = [ThreadDataMiddleware(), SandboxMiddleware(), TitleMiddleware()]
def make_lead_agent(config: RunnableConfig):
thinking_enabled = config.get("configurable", {}).get("thinking_enabled", True)
model_name = config.get("configurable", {}).get("model_name")
model_name = config.get("configurable", {}).get("model_name") or config.get("configurable", {}).get("model")
print(f"thinking_enabled: {thinking_enabled}, model_name: {model_name}")
return create_agent(
model=create_chat_model(name=model_name, thinking_enabled=thinking_enabled),