Goal
PawWork should send Kimi/Moonshot-compatible tool-call requests in a shape their APIs accept, without changing unrelated provider behavior or adding model-specific behavior patches.
Scope
In scope:
- Guard empty message content before provider requests where it can break Kimi/Moonshot-compatible endpoints.
- Keep the existing Moonshot/Kimi
$ref schema sanitizer behavior, including preserving root $defs / definitions.
- Add conservative missing
type normalization for Kimi/Moonshot tool schema properties.
- Ensure Kimi-like provider/model aliases are covered by the compatibility path.
- Add targeted regression tests in the provider transform test suite.
Out of scope:
Relevant files or context
Likely files:
packages/opencode/src/provider/transform.ts
packages/opencode/test/provider/transform.test.ts
packages/opencode/src/provider/pawwork-providers.ts
Context:
Verification
- Add regression coverage for empty content handling.
- Add regression coverage for
$ref sibling cleanup while preserving root $defs / definitions.
- Add regression coverage for missing property
type normalization.
- Add coverage that Kimi-like aliases enter the compatibility path.
- Run the targeted provider transform test file.
- Confirm unrelated provider paths are not changed by the new tests or implementation.
Execution mode
Agent should investigate and propose a plan first.
Goal
PawWork should send Kimi/Moonshot-compatible tool-call requests in a shape their APIs accept, without changing unrelated provider behavior or adding model-specific behavior patches.
Scope
In scope:
$refschema sanitizer behavior, including preserving root$defs/definitions.typenormalization for Kimi/Moonshot tool schema properties.Out of scope:
Relevant files or context
Likely files:
packages/opencode/src/provider/transform.tspackages/opencode/test/provider/transform.test.tspackages/opencode/src/provider/pawwork-providers.tsContext:
Verification
$refsibling cleanup while preserving root$defs/definitions.typenormalization.Execution mode
Agent should investigate and propose a plan first.