Skip to content

Add getFeatures() for stable tool calling discovery - #44

Merged
SamSamskies merged 1 commit into
mainfrom
add-get-features
Aug 14, 2026
Merged

Add getFeatures() for stable tool calling discovery#44
SamSamskies merged 1 commit into
mainfrom
add-get-features

Conversation

@SamSamskies

Copy link
Copy Markdown
Owner

Summary

  • Add window.inference.getFeatures() so pages can discover what the stable IPA request surface supports (currently { toolCalling: false } until tools graduate from experimental).
  • Document the method in the README (features list, spec status, experimental vs stable split, and a manual check).
  • Cover the snapshot with a unit test that loads content/inject.js in a fake window.

Test plan

  • window.inference.getFeatures() returns { toolCalling: false } (sync, no prompt)
  • window.inference.request(...) still rejects tools / toolChoice / toolCalls / role: "tool"
  • window.inference.experimental.request(...) still accepts tools as before
  • Run npm test (includes test/inject-features.test.js)

Made with Cursor

…atus

- Introduced `getFeatures()` method in `inject.js` to provide a snapshot of the stable IPA surface, returning `{ toolCalling: false }` until tools graduate from experimental status.
- Updated `README.md` to document the new method and its implications for tool interactions, clarifying that tool calling remains disabled in the stable API.
- Enhanced feature discovery section in the README to reflect the addition of `getFeatures()` and its role in the API contract.

These changes improve clarity around the current capabilities of the API and set expectations for future tool support.
@SamSamskies
SamSamskies merged commit 9ef0fdf into main Aug 14, 2026
1 check passed
@SamSamskies
SamSamskies deleted the add-get-features branch August 14, 2026 18:24
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.

1 participant