mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-10-26 08:30:22 +00:00
* feat(agent-core-v2): accept HEIC, HEIF, and BMP images for Kimi models Key the accepted image MIME set by the provider the agent is bound to instead of a single global allowlist: Kimi accepts PNG/JPEG/GIF/WebP plus BMP/HEIC/HEIF, every other provider keeps the baseline set. The provider image policy lives in the human layer (`llm/media/image-formats`) so both the agent-side gates and the Anthropic protocol lowering share it. - thread the provider type through every ingestion gate: ReadMediaFile, prompt entry, MCP tool results, session media references, kap-server prompt/skill routes; expose it via IAgentProfileService.getModelProviderType - ReadMediaFile sends accepted formats it cannot re-encode locally inline up to the provider's per-image budget (5MB for Kimi, 3.75MB otherwise) and points at a conversion command above that; full_resolution uses the same provider budget - acp-server no longer gates formats itself and leaves the decision to the engine prompt pipeline, which knows the bound provider - the Anthropic lowering allowlist follows the bound provider so Kimi over the Anthropic-compatible protocol no longer rejects HEIC client-side * fix(agent-core-v2): resolve the image format policy on the production paths Follow-ups from review of the provider-aware image formats: - the Anthropic lowering read the policy from `LlmModel.provider`, which the adapter registry sets to the route id (`anthropic`) rather than the model's provider type, so Kimi over the Anthropic-compatible protocol still rejected HEIC client-side; the accepted set now comes from a `ProtocolTrait.acceptedImageMimes` hook that the Kimi traits implement, and the test goes through the real trait with the routed provider id - kap-server prompt ingestion gated media against the currently bound model even when the same request selected another model; the profile service now resolves the provider type for a requested alias - the session media memo served a cached inline image to a provider that does not accept its format; memo hits are re-judged against the current provider before being returned - the media tools registrar keyed ReadMediaFile only by alias and capabilities, so a reload that changed the alias's provider type or protocol kept the stale tool; both now take part in the key * test(kap-server): keep the optional chain the lint autofix dropped |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| CHANGELOG.md | ||
| package.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||