Skip to content

v1.5.2

Latest

Choose a tag to compare

@wenyinos wenyinos released this 26 Nov 11:22

Official CLI header alignment

The proxy's upstream request headers are now shaped like the real DevEco Code CLI's, verified by capturing both sides against a local TLS capture proxy.

Captured from the official CLI

  • User-Agent: deveco/<version> ... instead of a Chrome UA
  • x-deveco-project: a 40-hex project id (previously absent)
  • Session-Id / x-deveco-session: ses_... (previously 32-hex)
  • x-deveco-task: msg_... (previously 32-hex)
  • exitSessionQueue carries the deveco/<version> UA
  • Chat-Id, Authorization, Content-Type and lang already matched

Proxy changes

  • New defaultProjectId(): a 40-hex SHA1 of the working directory, overridable with DEVECO_PROJECT_ID
  • upstreamSessionId() and newUpstreamTaskId() produce official-shaped ids
  • Inference and exit queue now send deveco/<PLUGIN_VERSION> as the UA
  • Removed the explicit accept-language: zh-CN
  • Applied to both the proxy path and the forward-compat plugin path

Documentation

  • The README now states that the built-in DevEco models require HUAWEI ID OAuth and do not accept API keys; API-key auth remains available for third-party providers only.

Remaining differences

  • x-deveco-client carries this project's version, not the official CLI build version
  • X-DevEco-Improvement-Enabled defaults to false; set DEVECO_TOOL_IMPROVEMENT=1 to match an account that has opted in
  • undici adds accept-language: * and sec-fetch-mode: cors; the official Bun CLI does not

Verification

  • 184 tests passing across 16 files; typecheck / lint / build clean
  • Real official CLI requests for GLM-5.1 and GLM-5.3 were captured and compared
  • Proxy smoke tests: OpenAI and Anthropic against both models, 4/4 HTTP 200