Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
35 changes: 34 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
pull_request:
branches:
- dev
- main

concurrency:
Expand Down Expand Up @@ -116,13 +117,31 @@ jobs:
fi

- name: Run Google LLM tests (flaky - timeouts allowed)
id: google_llm_tests
if: steps.google_changes.outputs.changed == 'true'
continue-on-error: true
run: npx jest src/llm/google/llm.spec.ts
run: npx jest src/llm/google/llm.spec.ts --runInBand
env:
NODE_OPTIONS: '--experimental-vm-modules'
NODE_ENV: test
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GOOGLE_TEST_CALL_GAP_MS: '1000'
GOOGLE_TEST_MAX_RETRIES: '2'
GOOGLE_TEST_MAX_RETRY_DELAY_MS: '50000'

- name: Surface Google LLM soft failure
if: always() && steps.google_changes.outputs.changed == 'true' && steps.google_llm_tests.outcome == 'failure'
run: |
echo "::warning title=Soft-failed Google LLM tests::The Google LLM integration suite failed, but this workflow allows provider API failures. Inspect the test job logs before merging."
{
echo "### Soft-failed Google LLM tests"
echo ""
echo "The Google LLM integration suite failed, but this job intentionally allows provider API failures."
echo ""
echo "- Suite: \`npx jest src/llm/google/llm.spec.ts --runInBand\`"
echo "- Active Gemini quotas: https://ai.dev/rate-limit"
echo "- Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
} >> "$GITHUB_STEP_SUMMARY"

- name: Check for Anthropic LLM changes
id: anthropic_changes
Expand All @@ -134,6 +153,7 @@ jobs:
fi

- name: Run Anthropic LLM tests (flaky - timeouts allowed)
id: anthropic_llm_tests
if: steps.anthropic_changes.outputs.changed == 'true'
continue-on-error: true
run: npx jest src/llm/anthropic/llm.spec.ts
Expand All @@ -142,6 +162,19 @@ jobs:
NODE_ENV: test
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Surface Anthropic LLM soft failure
if: always() && steps.anthropic_changes.outputs.changed == 'true' && steps.anthropic_llm_tests.outcome == 'failure'
run: |
echo "::warning title=Soft-failed Anthropic LLM tests::The Anthropic LLM integration suite failed, but this workflow allows provider API failures. Inspect the test job logs before merging."
{
echo "### Soft-failed Anthropic LLM tests"
echo ""
echo "The Anthropic LLM integration suite failed, but this job intentionally allows provider API failures."
echo ""
echo "- Suite: \`npx jest src/llm/anthropic/llm.spec.ts\`"
echo "- Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
} >> "$GITHUB_STEP_SUMMARY"

- name: Check for PTC changes
id: ptc_changes
run: |
Expand Down
38 changes: 33 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
workflow_dispatch:

permissions:
id-token: write # Required for OIDC trusted publishing
id-token: write # Required for OIDC trusted publishing
contents: read

jobs:
publish:
runs-on: ubuntu-latest
environment: publish # Must match npm trusted publisher config
environment: publish # Must match npm trusted publisher config
steps:
- uses: actions/checkout@v4

Expand All @@ -24,7 +24,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Update npm for OIDC support
run: npm install -g npm@latest # Must be 11.5.1+ for provenance
run: npm install -g npm@latest # Must be 11.5.1+ for provenance

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
BEDROCK_AWS_ACCESS_KEY_ID: ${{ secrets.BEDROCK_AWS_ACCESS_KEY_ID }}
BEDROCK_AWS_SECRET_ACCESS_KEY: ${{ secrets.BEDROCK_AWS_SECRET_ACCESS_KEY }}

- name: Check for Google LLM changes
id: google_changes
run: |
Expand All @@ -75,6 +75,7 @@ jobs:
fi

- name: Run Google LLM tests (flaky - timeouts allowed)
id: google_llm_tests
if: steps.google_changes.outputs.changed == 'true'
continue-on-error: true
timeout-minutes: 5
Expand All @@ -83,6 +84,19 @@ jobs:
NODE_ENV: test
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}

- name: Surface Google LLM soft failure
if: always() && steps.google_changes.outputs.changed == 'true' && steps.google_llm_tests.outcome == 'failure'
run: |
echo "::warning title=Soft-failed Google LLM tests::The Google LLM integration suite failed, but this workflow allows provider API failures. Inspect the publish job logs before releasing."
{
echo "### Soft-failed Google LLM tests"
echo ""
echo "The Google LLM integration suite failed, but this job intentionally allows provider API failures."
echo ""
echo "- Suite: \`npx jest src/llm/google/llm.spec.ts\`"
echo "- Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
} >> "$GITHUB_STEP_SUMMARY"

- name: Check for Anthropic LLM changes
id: anthropic_changes
run: |
Expand All @@ -100,6 +114,7 @@ jobs:
fi

- name: Run Anthropic LLM tests (flaky - timeouts allowed)
id: anthropic_llm_tests
if: steps.anthropic_changes.outputs.changed == 'true'
continue-on-error: true
timeout-minutes: 5
Expand All @@ -108,6 +123,19 @@ jobs:
NODE_ENV: test
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Surface Anthropic LLM soft failure
if: always() && steps.anthropic_changes.outputs.changed == 'true' && steps.anthropic_llm_tests.outcome == 'failure'
run: |
echo "::warning title=Soft-failed Anthropic LLM tests::The Anthropic LLM integration suite failed, but this workflow allows provider API failures. Inspect the publish job logs before releasing."
{
echo "### Soft-failed Anthropic LLM tests"
echo ""
echo "The Anthropic LLM integration suite failed, but this job intentionally allows provider API failures."
echo ""
echo "- Suite: \`npx jest src/llm/anthropic/llm.spec.ts\`"
echo "- Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
} >> "$GITHUB_STEP_SUMMARY"

- name: Check for PTC changes
id: ptc_changes
run: |
Expand Down Expand Up @@ -191,4 +219,4 @@ jobs:
if: steps.check.outputs.skip != 'true'
run: npm publish $(ls librechat-agents-*.tgz) --access public --provenance --tag ${{ steps.publish_tag.outputs.tag }}
env:
NODE_ENV: production
NODE_ENV: production
Loading
Loading