Skip to content

refactor(model): extract compat capability resolver - #817

Merged
XingYu-Zhong merged 1 commit into
KunAgent:developfrom
luoye520ww:codex/split-provider-client
Jul 9, 2026
Merged

refactor(model): extract compat capability resolver#817
XingYu-Zhong merged 1 commit into
KunAgent:developfrom
luoye520ww:codex/split-provider-client

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Summary

  • Extracts per-model compatibility capability resolution from the large HTTP model client.
  • Keeps existing request body and stream parser behavior unchanged.
  • Adds focused tests for provider defaults and per-model endpoint/capability overrides.

Changes

  • Adds compat-capabilities.ts as the compatibility capability registry boundary for endpoint format, vision, reasoning, cache usage, tool calling, and max output tokens.
  • Routes CompatModelClient endpoint format, reasoning, max-token, and vision checks through the resolver.
  • Preserves the legacy default that image forwarding is allowed when no capability resolver is configured.

Tests

  • npm.cmd --prefix kun test -- src/adapters/model/compat-capabilities.test.ts src/adapters/model/compat-model-client.endpoint-format.test.ts src/adapters/model/compat-model-client.tool-images.test.ts src/adapters/model/compat-model-client.streaming-tool-calls.test.ts src/adapters/model/compat-model-client.retry.test.ts
  • npm.cmd --prefix kun run typecheck
  • npm.cmd --prefix kun run build
  • git diff --check kunagent/develop...HEAD

@XingYu-Zhong XingYu-Zhong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed via Codex triage; approved for merge.

@XingYu-Zhong
XingYu-Zhong merged commit aa7edd2 into KunAgent:develop Jul 9, 2026
@luoye520ww
luoye520ww deleted the codex/split-provider-client branch July 13, 2026 06:06
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.

2 participants