chore: require OpenSandbox credentials#6994
Conversation
Coverage Report
File CoverageNo changed files found. |
|
✅ Docs Preview Deployed! 🔗 👀 Click here to visit preview 🕒 Time: 2026-05-26 22:53:23 (UTC+8) |
There was a problem hiding this comment.
Pull request overview
This PR tightens Agent Sandbox configuration by requiring OpenSandbox to be explicitly configured with both a base URL and an API key before the feature is enabled/usable, and updates deployment docker-compose templates to ship OpenSandbox + volume-manager services wired to a shared initial API key.
Changes:
- Require
opensandboxprovider configs to includeapiKey(and base URL) during validation and adapter config building. - Update env parsing/gating so
opensandboxis only considered “configured” when bothAGENT_SANDBOX_OPENSANDBOX_BASEURLandAGENT_SANDBOX_OPENSANDBOX_API_KEYare set. - Restore/add OpenSandbox + volume-manager services and related env/config blocks in main docker-compose templates (global + cn variants), including a shared
SANDBOX_API_KEY-driven key.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/service/test/core/ai/sandbox/provider/config.test.ts | Updates unit tests to assert OpenSandbox now requires apiKey and still validates base URL/runtime. |
| packages/service/env.ts | Changes sandbox-feature gating for OpenSandbox to require base URL + API key; makes OpenSandbox base URL env optional in schema. |
| packages/service/core/ai/sandbox/provider/config.ts | Enforces OpenSandbox apiKey requirement in validateSandboxConfig; normalizes missing base URL to '' before validation. |
| document/public/deploy/docker/main/global/docker-compose.zilliz.yml | Adds OpenSandbox + volume-manager services and wires FastGPT env to OpenSandbox credentials (global zilliz variant). |
| document/public/deploy/docker/main/global/docker-compose.seekdb.yml | Same as above for global seekdb variant. |
| document/public/deploy/docker/main/global/docker-compose.pg.yml | Same as above for global pg variant. |
| document/public/deploy/docker/main/global/docker-compose.opengauss.yml | Same as above for global opengauss variant. |
| document/public/deploy/docker/main/global/docker-compose.oceanbase.yml | Same as above for global oceanbase variant (incl. configs block merge). |
| document/public/deploy/docker/main/global/docker-compose.milvus.yml | Same as above for global milvus variant. |
| document/public/deploy/docker/main/cn/docker-compose.zilliz.yml | Adds OpenSandbox + volume-manager services and wires FastGPT env to OpenSandbox credentials (cn zilliz variant, registry.cn images). |
| document/public/deploy/docker/main/cn/docker-compose.seekdb.yml | Same as above for cn seekdb variant. |
| document/public/deploy/docker/main/cn/docker-compose.pg.yml | Same as above for cn pg variant. |
| document/public/deploy/docker/main/cn/docker-compose.opengauss.yml | Same as above for cn opengauss variant. |
| document/public/deploy/docker/main/cn/docker-compose.oceanbase.yml | Same as above for cn oceanbase variant (incl. configs block merge). |
| document/public/deploy/docker/main/cn/docker-compose.milvus.yml | Same as above for cn milvus variant. |
| deploy/version/main/docker-compose.template.yml | Updates the main compose template to include OpenSandbox + volume-manager services, a shared SANDBOX_API_KEY, and related FastGPT env wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| process.env.AGENT_SANDBOX_OPENSANDBOX_BASEURL && process.env.AGENT_SANDBOX_OPENSANDBOX_API_KEY | ||
| ); | ||
| } | ||
|
|
| # OpenSandbox API key. Override with SANDBOX_API_KEY before running docker compose. | ||
| x-opensandbox-api-key: &x-opensandbox-api-key ${SANDBOX_API_KEY:-fastgpt-opensandbox-api-key} | ||
| # volume manager auth token | ||
| x-volume-manager-auth-token: &x-volume-manager-auth-token 'vmtoken' |
|
✅ Build Successful - Preview fastgpt Image for this PR: 🕒 Time: 2026-05-27 00:06:08 (UTC+8) |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-05-27 00:06:14 (UTC+8) |
dd78d89 to
ee10431
Compare
Summary
Tests