feat: add root-level tools map with customParameters to AI Config types#1295
Draft
jsonbailey wants to merge 6 commits intomainfrom
Draft
feat: add root-level tools map with customParameters to AI Config types#1295jsonbailey wants to merge 6 commits intomainfrom
jsonbailey wants to merge 6 commits intomainfrom
Conversation
…ess tracker resumption (#1270)
Adds LDTool interface and tools map (keyed by tool name) to completion and agent config types. The root-level tools map is distinct from model.parameters.tools[] which remains passable to LLM providers as-is. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
|
@launchdarkly/browser size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LDToolinterface withname,type?,parameters?, andcustomParameters?fieldstools?: { [toolName: string]: LDTool }toLDAICompletionConfig,LDAICompletionConfigDefault,LDAIAgentConfig, andLDAIAgentConfigDefaultLDAIConfigFlagValueandLDAIConfigUtilsto parse and propagate the root-leveltoolsmapBackground
The LaunchDarkly backend now includes a root-level
toolsmap (sibling tomodel) in AI Config flag variations. This is separate frommodel.parameters.tools[]which is the raw array passable to LLM providers as-is. LLM providers reject unknown properties, socustomParameterscannot live insidemodel.parameters.tools[]— hence the split.Wire format:
{ "tools": { "web-search-tool": { "name": "web-search-tool", "type": "function", "parameters": { ... }, "customParameters": { "some-custom-parameter": "some-custom-value" } } } }Note
Supersedes PR #1175 (
devin/1773277027-add-tool-instructions-examples) which had the wrong structure (array instead of map, wrong fieldskey/version/instructions/examples, and targetedmaininstead offeat/ai-sdk-next-release).Test plan
yarn workspace @launchdarkly/server-sdk-ai test— all existing tests pass, 4 new tests for tools map coverageyarn workspace @launchdarkly/server-sdk-ai build— no TypeScript errorsyarn workspace @launchdarkly/server-sdk-ai lint— no lint errors🤖 Generated with Claude Code