Skip to content

feat(client): WebUI/Cline compatibility and configurable env vars#48

Open
SevaAIgnatyev wants to merge 1 commit intoTelegramMessenger:mainfrom
HyperlinksSpace:feature/client-env-webui-compat
Open

feat(client): WebUI/Cline compatibility and configurable env vars#48
SevaAIgnatyev wants to merge 1 commit intoTelegramMessenger:mainfrom
HyperlinksSpace:feature/client-env-webui-compat

Conversation

@SevaAIgnatyev
Copy link

Summary

Improves Cocoon client usability for OpenAI-compatible UIs (WebUI, Cline, etc.) and makes cocoon-launch configurable via environment variables without changing defaults.

Changes

  • Client (ClientRunner.cpp)
    Set Content-Type: application/json for the models list response (/v1/models).
    Some clients (e.g. WebUI, Cline) require this header to treat the response as JSON; without it they may fail or mis-handle the list.

  • cocoon-launch

    • COCOON_ROUTER_POLICY (default: tdx) — router listen policy (e.g. any for local/dev without TDX).
    • COCOON_CLIENT_VERBOSITY (default: 3) — client log level (-vN).
    • COCOON_BUILD_JOBS — number of parallel build jobs (useful to limit memory use, e.g. on WSL).
  • benchmark
    run-benchmark.sh can run without Go: if hey is not in PATH and go is not installed, it downloads the hey binary so the benchmark still runs.

  • .gitignore
    Ignore benchmark/hey and nul (downloaded/generated artifacts).

Backward compatibility

All new options use the same defaults as current behavior; no config or script changes required for existing users.

Testing

  • Client: verified models list returns Content-Type: application/json and is accepted by WebUI/Cline.
  • cocoon-launch: default behavior unchanged; COCOON_ROUTER_POLICY=any and COCOON_BUILD_JOBS tested on WSL.
  • Benchmark: runs with and without Go installed.

- Client: set Content-Type application/json for models list responses
  (fixes compatibility with WebUI, Cline and other OpenAI-compatible UIs)
- cocoon-launch: configurable via env vars
  - COCOON_ROUTER_POLICY (default: tdx) for router listen policy
  - COCOON_CLIENT_VERBOSITY (default: 3) for client log level
  - COCOON_BUILD_JOBS to limit parallel build jobs (e.g. on WSL)
- benchmark: run without Go by downloading hey binary when go not installed
- .gitignore: benchmark/hey, nul (generated/downloaded artifacts)

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant