Skip to content

refactor(kosong): rename select_tools capability to dynamically_loaded_tools#1488

Open
starquakee wants to merge 3 commits into
MoonshotAI:mainfrom
starquakee:refactor/dynamically-loaded-tools-capability
Open

refactor(kosong): rename select_tools capability to dynamically_loaded_tools#1488
starquakee wants to merge 3 commits into
MoonshotAI:mainfrom
starquakee:refactor/dynamically-loaded-tools-capability

Conversation

@starquakee

@starquakee starquakee commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No standalone issue — terminology follow-up to #1369.

Problem

ModelCapability describes what a model can do, and its existing vocabulary is wire-level facts (image_in, thinking, tool_use). The dynamic tool loading bit shipped as select_tools — the name of the client-side tool that drives the feature, not the model's ability. The model's ability is accepting message-level tool declarations (dynamically loaded tools); the config-to-mechanism translation belongs to the agent layer.

What changed

The capability is renamed to dynamically_loaded_tools everywhere it is declared, detected, catalogued, and forwarded (kosong ModelCapability/catalog, agent-core capability resolution and gate, SDK catalog-to-alias mapping, and the built-in catalog pruner's keep list).

The old select_tools spelling is removed outright rather than kept as an alias: no catalogued model or shipped configuration ever used the capability, so there is nothing to migrate.

Client-side vocabulary is deliberately untouched: the select_tools builtin tool and the tool-select experimental flag name the mechanism, which is exactly where those names belong.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset. (Changeset included: @moonshot-ai/kosong patch + @moonshot-ai/kimi-code patch + @moonshot-ai/kimi-code-sdk patch.)
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7bfca29

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/kosong Patch
@moonshot-ai/kimi-code Patch
@moonshot-ai/kimi-code-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@7bfca29
npx https://pkg.pr.new/@moonshot-ai/kimi-code@7bfca29

commit: 7bfca29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92600810ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/kosong/src/catalog.ts Outdated
@starquakee

starquakee commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Verified and fixed in dcdc3df: the built-in catalog pruner now preserves dynamically_loaded_tools before catalogModelToCapability runs. I also swept the catalog path for other projection whitelists, and this is the only one.

@starquakee

starquakee commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

CI failure was a teardown flake in server/test/ws-resync.e2e.test.ts (rmSync ENOTEMPTY racing an async flush) — unrelated to this PR, which touches no server files. Passes locally; retriggered via empty commit and now green.

…d_tools

Rename the `ModelCapability` bit from `select_tools` to `dynamically_loaded_tools` everywhere it is declared, detected, catalogued, and forwarded: kosong `ModelCapability`/catalog, agent-core capability resolution and the `toolSelectEnabled` gate, the SDK catalog-to-alias mapping, and the built-in catalog pruner's keep list.

The old `select_tools` spelling is removed outright rather than kept as an alias — no catalogued model or shipped configuration used the capability, so there is nothing to migrate. Client-side vocabulary (the `select_tools` builtin tool and the `tool-select` experimental flag) is intentionally untouched.
@starquakee starquakee force-pushed the refactor/dynamically-loaded-tools-capability branch from 4e35692 to 9e64661 Compare July 8, 2026 07:14
@RealKai42

Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e646618ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/agent-core/src/session/provider-manager.ts
fengchenchen added 2 commits July 8, 2026 15:42
…efactor/dynamically-loaded-tools-capability

# Conflicts:
#	.changeset/select-tools-discard-on-compaction.md
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