Skip to content

chore: remove _agentConfigInternal and use _agentConfig directly#1297

Merged
jsonbailey merged 1 commit intofeat/ai-sdk-next-releasefrom
jb/aic-2202/fix-agent-config-internal
Apr 20, 2026
Merged

chore: remove _agentConfigInternal and use _agentConfig directly#1297
jsonbailey merged 1 commit intofeat/ai-sdk-next-releasefrom
jb/aic-2202/fix-agent-config-internal

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented Apr 20, 2026

Summary

  • Removes the duplicate _agentConfigInternal private method from LDAIClientImpl
  • Replaces its single call site with _agentConfig(key, context, disabledAIConfig, variables, graphKey), correcting the parameter order (graphKey, variablesvariables, graphKey)

Test plan

  • yarn workspace @launchdarkly/server-sdk-ai lint passes
  • yarn workspace @launchdarkly/server-sdk-ai test passes (181 tests)

Note

Low Risk
Low risk refactor that removes a duplicate private helper and updates a single call site; behavior should remain the same aside from passing graphKey/variables in the correct order.

Overview
Simplifies LDAIClientImpl by deleting the redundant private _agentConfigInternal helper and having agentGraph call _agentConfig directly.

This also fixes the argument ordering for the internal agent-config fetch in agentGraph (passing variables before graphKey) so configs are evaluated with the intended interpolation variables and graph tracking context.

Reviewed by Cursor Bugbot for commit 0670ad5. Bugbot is set up for automated code reviews on this repo. Configure here.

Replaces the duplicate private method with a call to the existing _agentConfig, correcting the parameter order (graphKey, variables → variables, graphKey).
@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25623 bytes
Compressed size limit: 29000
Uncompressed size: 125843 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31655 bytes
Compressed size limit: 34000
Uncompressed size: 112792 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179375 bytes
Compressed size limit: 200000
Uncompressed size: 829982 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 37169 bytes
Compressed size limit: 38000
Uncompressed size: 204305 bytes

@jsonbailey jsonbailey marked this pull request as ready for review April 20, 2026 20:35
@jsonbailey jsonbailey requested a review from a team as a code owner April 20, 2026 20:35
@jsonbailey jsonbailey merged commit 1cbd337 into feat/ai-sdk-next-release Apr 20, 2026
44 checks passed
@jsonbailey jsonbailey deleted the jb/aic-2202/fix-agent-config-internal branch April 20, 2026 20:50
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