kimi-code/packages/node-sdk/src
Kai ec88d352e8
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-windows (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
fix: five correctness follow-ups to the catalog metadata work (#2030)
* fix: five correctness follow-ups to the catalog metadata work

- Normalize a configured effort value (case/whitespace) before thinking
  resolution on both engines, so "OFF" is read as off instead of being
  sent upstream as an invalid effort.
- Clamp a declared input cap to the effective context window in the
  effective model resolution, so an override lowering max_context_size
  cannot leave a stale larger cap behind.
- Report context usage against the same effective cap
  (max_input_tokens ?? max_context_tokens) in the SDK getStatus and the
  v2 legacy status projections, matching the session-event and service
  surfaces.
- Preserve concretely declared per-model endpoints when the override
  npm is unrecognized, via the same OpenAI-compatible fallback used for
  top-level entries.
- Attribute resolved.maxInputSize and resolved.capabilities
  .max_input_tokens in the model inspector to their config, override,
  or clamp provenance.

* fix: honor observed context caps and publish the effective cap in v2 status

- The overflow-learned provider window is now written into both
  max_context_tokens and max_input_tokens of the effective compaction
  context, so the strategy cannot bypass it by re-selecting the raw
  catalog input cap during overflow recovery.
- agent.status.updated publishes max_input_tokens ?? max_context_tokens,
  matching the other v1/v2 status surfaces.

* fix: never mutate config on clamp, cap usage ratio, and refuse proprietary override SDKs

- effectiveModelAlias / effectiveModelConfig now build a copy before
  clamping maxInputSize to the effective window instead of rewriting
  the caller's config record in place.
- context_usage is clamped to 1 in the v2 legacy status, the v1
  session service, and the SDK getStatus; the default-model status
  fallback also resolves the input cap.
- Overrides naming known proprietary SDKs (Bedrock, Cohere) are
  refused before the OpenAI-compatible fallback, matching top-level
  import behavior.
- The inspector attributes a clamped maxInputSize to the clamp even
  when the raw value came from models.*.overrides.

* fix: normalize forced efforts, prefer input cap in WS status, keep raw event ratio

- Whitespace-only configured efforts now read as absent, and the
  KIMI_MODEL_THINKING_EFFORT override is lowercased on both engines.
- kap-server's WS legacy status publishes max_input_tokens ??
  max_context_tokens like the other status surfaces.
- SDK getStatus keeps the ratio unclamped on purpose (>100% is the
  documented overflow signal on that path); schema-bounded REST status
  stays clamped to 1.
- Pin the provider-observed window beating a declared input cap with a
  v1 full-compaction regression test.

* fix: attribute resolved.maxInputSize provenance and drop test-body comments in v2
2026-07-22 03:13:10 +08:00
..
auth.ts feat(feedback): support attaching logs and codebase (#1120) 2026-06-26 16:15:08 +08:00
catalog.ts fix: consume the model metadata declared by the models.dev catalog (#2015) 2026-07-22 01:23:31 +08:00
config-rpc.ts feat(cli): add doctor command for config validation (#431) 2026-06-04 21:15:18 +08:00
events.ts feat: support plugin slash commands (#1204) 2026-06-30 19:38:01 +08:00
index.ts fix: consume the model metadata declared by the models.dev catalog (#2015) 2026-07-22 01:23:31 +08:00
kimi-code-model-provider.ts feat(managed-kimi-code): route anthropic protocol via beta api (#1186) 2026-06-29 14:24:01 +08:00
kimi-harness.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
oauth-error.ts fix: classify OAuth token refresh errors by cause (#838) 2026-06-17 18:34:42 +08:00
rpc.ts fix: five correctness follow-ups to the catalog metadata work (#2030) 2026-07-22 03:13:10 +08:00
sdk-rpc-client.ts feat(agent-core): default print mode to steer with unbounded limits (#1722) 2026-07-15 11:11:00 +08:00
session.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
types.ts fix(tui): keep long sessions responsive and bound resumed history (#1976) 2026-07-21 15:20:12 +08:00