Skip to content

Commit d5cbe64

Browse files
Merge branch 'main' into filesearch-rewrite-query
2 parents 08a1c4e + dc4665a commit d5cbe64

File tree

61 files changed

+15801
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+15801
-552
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# These owners will be the default owners for everything in
44
# the repo. Unless a later match takes precedence,
5-
* @ashwinb @yanxi0830 @hardikjshah @raghotham @ehhuang @leseb @bbrowning @reluctantfuturist @mattf @slekkala1 @franciscojavierarceo
5+
* @ashwinb @raghotham @ehhuang @leseb @bbrowning @mattf @franciscojavierarceo
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Setup TypeScript client
2+
description: Conditionally checkout and link llama-stack-client-typescript based on client-version
3+
inputs:
4+
client-version:
5+
description: 'Client version (latest or published)'
6+
required: true
7+
8+
outputs:
9+
ts-client-path:
10+
description: 'Path or version to use for TypeScript client'
11+
value: ${{ steps.set-path.outputs.ts-client-path }}
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- name: Checkout TypeScript client (latest)
17+
if: ${{ inputs.client-version == 'latest' }}
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
repository: llamastack/llama-stack-client-typescript
21+
ref: main
22+
path: .ts-client-checkout
23+
24+
- name: Set TS_CLIENT_PATH
25+
id: set-path
26+
shell: bash
27+
run: |
28+
if [ "${{ inputs.client-version }}" = "latest" ]; then
29+
echo "ts-client-path=${{ github.workspace }}/.ts-client-checkout" >> $GITHUB_OUTPUT
30+
elif [ "${{ inputs.client-version }}" = "published" ]; then
31+
echo "ts-client-path=^0.3.2" >> $GITHUB_OUTPUT
32+
else
33+
echo "::error::Invalid client-version: ${{ inputs.client-version }}"
34+
exit 1
35+
fi

.github/workflows/integration-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,27 @@ jobs:
9393
suite: ${{ matrix.config.suite }}
9494
inference-mode: 'replay'
9595

96+
- name: Setup Node.js for TypeScript client tests
97+
if: ${{ matrix.client == 'server' }}
98+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
99+
with:
100+
node-version: '20'
101+
cache: 'npm'
102+
cache-dependency-path: tests/integration/client-typescript/package-lock.json
103+
104+
- name: Setup TypeScript client
105+
if: ${{ matrix.client == 'server' }}
106+
id: setup-ts-client
107+
uses: ./.github/actions/setup-typescript-client
108+
with:
109+
client-version: ${{ matrix.client-version }}
110+
96111
- name: Run tests
97112
if: ${{ matrix.config.allowed_clients == null || contains(matrix.config.allowed_clients, matrix.client) }}
98113
uses: ./.github/actions/run-and-record-tests
99114
env:
100115
OPENAI_API_KEY: dummy
116+
TS_CLIENT_PATH: ${{ steps.setup-ts-client.outputs.ts-client-path || '' }}
101117
with:
102118
stack-config: >-
103119
${{ matrix.config.stack_config

.github/workflows/stainless-builds.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,41 @@ env:
4343
# Stainless organization dashboard
4444

4545
jobs:
46+
compute-branch:
47+
runs-on: ubuntu-latest
48+
outputs:
49+
preview_branch: ${{ steps.compute.outputs.preview_branch }}
50+
base_branch: ${{ steps.compute.outputs.base_branch }}
51+
merge_branch: ${{ steps.compute.outputs.merge_branch }}
52+
steps:
53+
- name: Compute branch names
54+
id: compute
55+
run: |
56+
HEAD_REPO="${{ github.event.pull_request.head.repo.full_name }}"
57+
BASE_REPO="${{ github.repository }}"
58+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
59+
FORK_OWNER="${{ github.event.pull_request.head.repo.owner.login }}"
60+
61+
if [ "$HEAD_REPO" != "$BASE_REPO" ]; then
62+
# Fork PR: prefix with fork owner for isolation
63+
if [ -z "$FORK_OWNER" ]; then
64+
echo "Error: Fork PR detected but fork owner is empty" >&2
65+
exit 1
66+
fi
67+
PREVIEW_BRANCH="preview/${FORK_OWNER}/${BRANCH_NAME}"
68+
BASE_BRANCH="preview/base/${FORK_OWNER}/${BRANCH_NAME}"
69+
else
70+
# Same-repo PR
71+
PREVIEW_BRANCH="preview/${BRANCH_NAME}"
72+
BASE_BRANCH="preview/base/${BRANCH_NAME}"
73+
fi
74+
75+
echo "preview_branch=${PREVIEW_BRANCH}" >> $GITHUB_OUTPUT
76+
echo "base_branch=${BASE_BRANCH}" >> $GITHUB_OUTPUT
77+
echo "merge_branch=${PREVIEW_BRANCH}" >> $GITHUB_OUTPUT
78+
4679
preview:
80+
needs: compute-branch
4781
if: github.event.action != 'closed'
4882
runs-on: ubuntu-latest
4983
permissions:
@@ -59,8 +93,6 @@ jobs:
5993
ref: ${{ github.event.pull_request.head.sha }}
6094
fetch-depth: 2
6195

62-
# This action builds preview SDKs from the OpenAPI spec changes and
63-
# posts/updates a comment on the PR with build results and links to the preview.
6496
- name: Run preview builds
6597
uses: stainless-api/upload-openapi-spec-action/preview@32823b096b4319c53ee948d702d9052873af485f # 1.6.0
6698
with:
@@ -73,8 +105,11 @@ jobs:
73105
base_sha: ${{ github.event.pull_request.base.sha }}
74106
base_ref: ${{ github.event.pull_request.base.ref }}
75107
head_sha: ${{ github.event.pull_request.head.sha }}
108+
branch: ${{ needs.compute-branch.outputs.preview_branch }}
109+
base_branch: ${{ needs.compute-branch.outputs.base_branch }}
76110

77111
merge:
112+
needs: compute-branch
78113
if: github.event.action == 'closed' && github.event.pull_request.merged == true
79114
runs-on: ubuntu-latest
80115
permissions:
@@ -91,11 +126,11 @@ jobs:
91126
fetch-depth: 2
92127

93128
# Note that this only merges in changes that happened on the last build on
94-
# preview/${{ github.head_ref }}. It's possible that there are OAS/config
95-
# changes that haven't been built, if the preview-sdk job didn't finish
129+
# the computed preview branch. It's possible that there are OAS/config
130+
# changes that haven't been built, if the preview job didn't finish
96131
# before this step starts. In theory we want to wait for all builds
97-
# against preview/${{ github.head_ref }} to complete, but assuming that
98-
# the preview-sdk job happens before the PR merge, it should be fine.
132+
# against the preview branch to complete, but assuming that
133+
# the preview job happens before the PR merge, it should be fine.
99134
- name: Run merge build
100135
uses: stainless-api/upload-openapi-spec-action/merge@32823b096b4319c53ee948d702d9052873af485f # 1.6.0
101136
with:
@@ -108,3 +143,4 @@ jobs:
108143
base_sha: ${{ github.event.pull_request.base.sha }}
109144
base_ref: ${{ github.event.pull_request.base.ref }}
110145
head_sha: ${{ github.event.pull_request.head.sha }}
146+
merge_branch: ${{ needs.compute-branch.outputs.merge_branch }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ docs/static/imported-files/
3535
docs/docs/api-deprecated/
3636
docs/docs/api-experimental/
3737
docs/docs/api/
38+
tests/integration/client-typescript/node_modules/
39+
.ts-client-checkout/

client-sdks/stainless/openapi.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9862,9 +9862,21 @@ components:
98629862
title: Object
98639863
default: vector_store.file
98649864
attributes:
9865-
additionalProperties: true
9865+
additionalProperties:
9866+
anyOf:
9867+
- type: string
9868+
maxLength: 512
9869+
- type: number
9870+
- type: boolean
9871+
title: string | number | boolean
9872+
propertyNames:
9873+
type: string
9874+
maxLength: 64
98669875
type: object
9876+
maxProperties: 16
98679877
title: Attributes
9878+
description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
9879+
x-oaiTypeLabel: map
98689880
chunking_strategy:
98699881
oneOf:
98709882
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'

docs/docs/providers/inference/remote_bedrock.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ AWS Bedrock inference provider using OpenAI compatible endpoint.
2222
## Sample Configuration
2323

2424
```yaml
25-
api_key: ${env.AWS_BEDROCK_API_KEY:=}
25+
api_key: ${env.AWS_BEARER_TOKEN_BEDROCK:=}
2626
region_name: ${env.AWS_DEFAULT_REGION:=us-east-2}
2727
```

docs/package-lock.json

Lines changed: 19 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"react-dom": "^19.0.0",
3232
"remark-code-import": "^1.2.0"
3333
},
34+
"overrides": {
35+
"glob": "^10.5.0"
36+
},
3437
"browserslist": {
3538
"production": [
3639
">0.5%",

0 commit comments

Comments
 (0)