kimi-code/packages/agent-core
Kai 1bf2c9afee
feat: keep image-heavy sessions within provider request-size limits (#1508)
* feat(kosong): classify HTTP 413 request-body-too-large as a dedicated error type

* feat(agent-core): lower default image downscale cap to 2000px and make it configurable

* feat(agent-core): strip media to text markers and retry when the compaction request is too large

* feat(agent-core): cap model-initiated image reads with a configurable byte budget

* feat(agent-core): resend with degraded media when the provider rejects the request body as too large

* test(agent-core): add explicit timeouts to encode-heavy image budget tests

* feat: add WebP decoding support with wasm integration

- Introduced a new WebP decoding module using @jsquash/webp's wasm decoder.
- Implemented functions to decode WebP images and check for animated WebP formats.
- Updated image compression tests to include scenarios for WebP handling, including encoding and decoding.
- Enhanced error handling for API request size limits to accommodate various error messages.
- Updated pnpm lockfile to include new dependencies for WebP encoding and decoding.

* chore(changeset): consolidate this PR's entries into one

* fix(nix): update pnpmDeps hash for merged lockfile

* feat(agent-core): refuse HEIC/HEIF reads with platform-matched conversion guidance
2026-07-09 18:05:14 +08:00
..
scripts feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
src feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
test feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
CHANGELOG.md ci: release packages (#1355) 2026-07-04 19:17:47 +08:00
package.json feat: keep image-heavy sessions within provider request-size limits (#1508) 2026-07-09 18:05:14 +08:00
README.md Kimi For Coding 2026-05-22 15:54:50 +08:00
tsconfig.json feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
tsdown.config.ts feat(web): introduce Kimi web app and daemon gateway (#625) 2026-06-17 20:53:46 +08:00
vitest.config.ts chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00

@moonshot-ai/agent-core

The unified agent engine for Kimi Code.

Part of the Kimi Code monorepo.

See the main repository for documentation, issues, and contribution guidelines.

License

MIT