fix: bound Work model generation
This commit is contained in:
@@ -9,6 +9,7 @@ from agent_platform.config import Settings
|
||||
|
||||
TRANSIENT_COMPLETE_STATUS_CODES = frozenset({408, 425, 429, 500, 502, 503, 504, 524})
|
||||
COMPLETE_MAX_ATTEMPTS = 2
|
||||
COMPLETE_MAX_TOKENS = 4096
|
||||
MAX_RETRY_DELAY_SECONDS = 5.0
|
||||
|
||||
|
||||
@@ -152,6 +153,7 @@ class ModelProvider:
|
||||
"model": model,
|
||||
"messages": messages,
|
||||
"stream": True,
|
||||
"max_tokens": COMPLETE_MAX_TOKENS,
|
||||
}
|
||||
if tools:
|
||||
payload["tools"] = tools
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
- Public host port: `12004`
|
||||
- Execution provider: `ssh-docker`
|
||||
- Execution host Docker root: `/srv/k1412-data/docker`
|
||||
- Runtime model API route: `http://172.31.0.1:3000` (NAS host gateway
|
||||
from the `k1412-agent_egress` network, bypassing the public proxy)
|
||||
- Execution host workspace volumes: Docker volumes named
|
||||
`k1412-ws-data-<hashed-user-id>`
|
||||
|
||||
@@ -32,6 +34,11 @@ Copy `deploy/docker-compose.yml`, `deploy/docker-compose.override.yml`, and
|
||||
tags and non-secret settings in the protected `.env`, validate with
|
||||
`docker compose config`, pull, and recreate.
|
||||
|
||||
On the NAS deployment, set `MODEL_API_BASE_URL` to the internal model API route
|
||||
listed above. `https://api.k1412.top` remains the external API entrypoint, but
|
||||
Runtime must not send long-running Agent inference through the public reverse
|
||||
proxy.
|
||||
|
||||
The SSH override removes `/var/run/docker.sock` from Gateway and mounts the
|
||||
dedicated SSH directory read-only at `/root/.ssh`.
|
||||
|
||||
|
||||
@@ -136,7 +136,9 @@ async def test_complete_aggregates_streamed_tool_call(settings: Settings) -> Non
|
||||
body = "".join(f"data: {json.dumps(chunk)}\n\n" for chunk in chunks) + "data: [DONE]\n\n"
|
||||
|
||||
def handler(request: httpx.Request) -> httpx.Response:
|
||||
assert json.loads(request.content)["stream"] is True
|
||||
request_payload = json.loads(request.content)
|
||||
assert request_payload["stream"] is True
|
||||
assert request_payload["max_tokens"] == 4096
|
||||
return httpx.Response(
|
||||
200,
|
||||
request=request,
|
||||
|
||||
Reference in New Issue
Block a user