Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Make unit test less brittle and add CI
  • Loading branch information
jsonbailey committed Oct 13, 2025
commit c08f98418ce6e37db2adb5a67e47b2bdaec51ec2
27 changes: 27 additions & 0 deletions 27 .github/workflows/server-ai-langchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ai-providers/server-ai-langchain

on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'

jobs:
build-test-langchain-provider:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
- id: shared
name: Shared CI Steps
uses: ./actions/ci
with:
workspace_name: '@launchdarkly/server-sdk-ai-langchain'
workspace_path: packages/ai-providers/server-ai-langchain
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ describe('LangChainProvider', () => {

expect(result.metrics.success).toBe(false);
expect(result.message.content).toBe('');
expect(mockLogger.warn).toHaveBeenCalledWith(
'Multimodal response not supported, expecting a string. Content type: object, Content:',
JSON.stringify({ type: 'image', data: 'base64data' }, null, 2),
);
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
});

it('returns success=false for array content and logs warning', async () => {
Expand All @@ -156,10 +153,7 @@ describe('LangChainProvider', () => {

expect(result.metrics.success).toBe(false);
expect(result.message.content).toBe('');
expect(mockLogger.warn).toHaveBeenCalledWith(
'Multimodal response not supported, expecting a string. Content type: object, Content:',
JSON.stringify(['text', { type: 'image', data: 'base64data' }], null, 2),
);
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
});
});

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.