llama-stack-client 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +16 -10
- package/.gitignore +1 -0
- package/.release-please-manifest.json +1 -1
- package/.stats.yml +4 -4
- package/CHANGELOG.md +80 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +22 -0
- package/api.md +1 -71
- package/dist/CHANGELOG.md +80 -0
- package/dist/README.md +22 -0
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +8 -17
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +8 -17
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +51 -12
- package/dist/index.d.ts +51 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/utils/query.d.ts +2 -0
- package/dist/internal/utils/query.d.ts.map +1 -0
- package/dist/{resources/alpha/post-training/post-training.js → internal/utils/query.js} +6 -24
- package/dist/internal/utils/query.js.map +1 -0
- package/dist/{resources/alpha/post-training.mjs → internal/utils/query.mjs} +5 -2
- package/dist/internal/utils/query.mjs.map +1 -0
- package/dist/package.json +1 -1
- package/dist/resources/alpha/alpha.d.ts +0 -4
- package/dist/resources/alpha/alpha.d.ts.map +1 -1
- package/dist/resources/alpha/alpha.js +0 -4
- package/dist/resources/alpha/alpha.js.map +1 -1
- package/dist/resources/alpha/alpha.mjs +0 -4
- package/dist/resources/alpha/alpha.mjs.map +1 -1
- package/dist/resources/alpha/eval/eval.d.ts +3 -0
- package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.js +3 -0
- package/dist/resources/alpha/eval/eval.js.map +1 -1
- package/dist/resources/alpha/eval/eval.mjs +3 -0
- package/dist/resources/alpha/eval/eval.mjs.map +1 -1
- package/dist/resources/alpha/eval/jobs.d.ts +3 -0
- package/dist/resources/alpha/eval/jobs.d.ts.map +1 -1
- package/dist/resources/alpha/eval/jobs.js +3 -0
- package/dist/resources/alpha/eval/jobs.js.map +1 -1
- package/dist/resources/alpha/eval/jobs.mjs +3 -0
- package/dist/resources/alpha/eval/jobs.mjs.map +1 -1
- package/dist/resources/alpha/index.d.ts +0 -1
- package/dist/resources/alpha/index.d.ts.map +1 -1
- package/dist/resources/alpha/index.js +1 -3
- package/dist/resources/alpha/index.js.map +1 -1
- package/dist/resources/alpha/index.mjs +0 -1
- package/dist/resources/alpha/index.mjs.map +1 -1
- package/dist/resources/alpha/inference.d.ts +8 -0
- package/dist/resources/alpha/inference.d.ts.map +1 -1
- package/dist/resources/alpha/inference.js +8 -0
- package/dist/resources/alpha/inference.js.map +1 -1
- package/dist/resources/alpha/inference.mjs +8 -0
- package/dist/resources/alpha/inference.mjs.map +1 -1
- package/dist/resources/batches.d.ts +8 -0
- package/dist/resources/batches.d.ts.map +1 -1
- package/dist/resources/batches.js +8 -0
- package/dist/resources/batches.js.map +1 -1
- package/dist/resources/batches.mjs +8 -0
- package/dist/resources/batches.mjs.map +1 -1
- package/dist/resources/beta/datasets.d.ts +4 -8
- package/dist/resources/beta/datasets.d.ts.map +1 -1
- package/dist/resources/chat/chat.d.ts +34 -32
- package/dist/resources/chat/chat.d.ts.map +1 -1
- package/dist/resources/chat/chat.js.map +1 -1
- package/dist/resources/chat/chat.mjs.map +1 -1
- package/dist/resources/chat/completions.d.ts +321 -713
- package/dist/resources/chat/completions.d.ts.map +1 -1
- package/dist/resources/chat/completions.js +8 -0
- package/dist/resources/chat/completions.js.map +1 -1
- package/dist/resources/chat/completions.mjs +8 -0
- package/dist/resources/chat/completions.mjs.map +1 -1
- package/dist/resources/completions.d.ts +10 -4
- package/dist/resources/completions.d.ts.map +1 -1
- package/dist/resources/completions.js +8 -0
- package/dist/resources/completions.js.map +1 -1
- package/dist/resources/completions.mjs +8 -0
- package/dist/resources/completions.mjs.map +1 -1
- package/dist/resources/conversations/conversations.d.ts +95 -2
- package/dist/resources/conversations/conversations.d.ts.map +1 -1
- package/dist/resources/conversations/conversations.js +3 -0
- package/dist/resources/conversations/conversations.js.map +1 -1
- package/dist/resources/conversations/conversations.mjs +3 -0
- package/dist/resources/conversations/conversations.mjs.map +1 -1
- package/dist/resources/conversations/items.d.ts +371 -8
- package/dist/resources/conversations/items.d.ts.map +1 -1
- package/dist/resources/conversations/items.js +3 -0
- package/dist/resources/conversations/items.js.map +1 -1
- package/dist/resources/conversations/items.mjs +3 -0
- package/dist/resources/conversations/items.mjs.map +1 -1
- package/dist/resources/embeddings.d.ts +8 -0
- package/dist/resources/embeddings.d.ts.map +1 -1
- package/dist/resources/embeddings.js +8 -0
- package/dist/resources/embeddings.js.map +1 -1
- package/dist/resources/embeddings.mjs +8 -0
- package/dist/resources/embeddings.mjs.map +1 -1
- package/dist/resources/files.d.ts +11 -8
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -0
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/files.mjs +3 -0
- package/dist/resources/files.mjs.map +1 -1
- package/dist/resources/index.d.ts +1 -4
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -7
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs +0 -3
- package/dist/resources/index.mjs.map +1 -1
- package/dist/resources/inspect.d.ts +3 -0
- package/dist/resources/inspect.d.ts.map +1 -1
- package/dist/resources/inspect.js +3 -0
- package/dist/resources/inspect.js.map +1 -1
- package/dist/resources/inspect.mjs +3 -0
- package/dist/resources/inspect.mjs.map +1 -1
- package/dist/resources/models/index.d.ts +1 -1
- package/dist/resources/models/index.d.ts.map +1 -1
- package/dist/resources/models/index.js.map +1 -1
- package/dist/resources/models/index.mjs.map +1 -1
- package/dist/resources/models/models.d.ts +7 -65
- package/dist/resources/models/models.d.ts.map +1 -1
- package/dist/resources/models/models.js +0 -19
- package/dist/resources/models/models.js.map +1 -1
- package/dist/resources/models/models.mjs +0 -19
- package/dist/resources/models/models.mjs.map +1 -1
- package/dist/resources/moderations.d.ts +3 -0
- package/dist/resources/moderations.d.ts.map +1 -1
- package/dist/resources/moderations.js +3 -0
- package/dist/resources/moderations.js.map +1 -1
- package/dist/resources/moderations.mjs +3 -0
- package/dist/resources/moderations.mjs.map +1 -1
- package/dist/resources/prompts/prompts.d.ts +3 -0
- package/dist/resources/prompts/prompts.d.ts.map +1 -1
- package/dist/resources/prompts/prompts.js +3 -0
- package/dist/resources/prompts/prompts.js.map +1 -1
- package/dist/resources/prompts/prompts.mjs +3 -0
- package/dist/resources/prompts/prompts.mjs.map +1 -1
- package/dist/resources/prompts/versions.d.ts +3 -0
- package/dist/resources/prompts/versions.d.ts.map +1 -1
- package/dist/resources/prompts/versions.js +3 -0
- package/dist/resources/prompts/versions.js.map +1 -1
- package/dist/resources/prompts/versions.mjs +3 -0
- package/dist/resources/prompts/versions.mjs.map +1 -1
- package/dist/resources/providers.d.ts +3 -0
- package/dist/resources/providers.d.ts.map +1 -1
- package/dist/resources/providers.js +3 -0
- package/dist/resources/providers.js.map +1 -1
- package/dist/resources/providers.mjs +3 -0
- package/dist/resources/providers.mjs.map +1 -1
- package/dist/resources/responses/input-items.d.ts +102 -3
- package/dist/resources/responses/input-items.d.ts.map +1 -1
- package/dist/resources/responses/responses.d.ts +582 -11
- package/dist/resources/responses/responses.d.ts.map +1 -1
- package/dist/resources/responses/responses.js.map +1 -1
- package/dist/resources/responses/responses.mjs.map +1 -1
- package/dist/resources/routes.d.ts +3 -0
- package/dist/resources/routes.d.ts.map +1 -1
- package/dist/resources/routes.js +3 -0
- package/dist/resources/routes.js.map +1 -1
- package/dist/resources/routes.mjs +3 -0
- package/dist/resources/routes.mjs.map +1 -1
- package/dist/resources/safety.d.ts +14 -11
- package/dist/resources/safety.d.ts.map +1 -1
- package/dist/resources/safety.js +3 -0
- package/dist/resources/safety.js.map +1 -1
- package/dist/resources/safety.mjs +3 -0
- package/dist/resources/safety.mjs.map +1 -1
- package/dist/resources/vector-io.d.ts +4 -4
- package/dist/resources/vector-stores/file-batches.d.ts +49 -1
- package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/dist/resources/vector-stores/file-batches.js.map +1 -1
- package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
- package/dist/resources/vector-stores/files.d.ts +100 -4
- package/dist/resources/vector-stores/files.d.ts.map +1 -1
- package/dist/resources/vector-stores/files.js.map +1 -1
- package/dist/resources/vector-stores/files.mjs.map +1 -1
- package/dist/resources/vector-stores/vector-stores.d.ts +51 -3
- package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/dist/resources/vector-stores/vector-stores.js.map +1 -1
- package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/dist/src/core.ts +10 -21
- package/dist/src/index.ts +51 -48
- package/{src/resources/alpha/post-training.ts → dist/src/internal/utils/query.ts} +5 -1
- package/dist/src/resources/alpha/alpha.ts +0 -20
- package/dist/src/resources/alpha/eval/eval.ts +3 -0
- package/dist/src/resources/alpha/eval/jobs.ts +3 -0
- package/dist/src/resources/alpha/index.ts +0 -8
- package/dist/src/resources/alpha/inference.ts +8 -0
- package/dist/src/resources/batches.ts +8 -0
- package/dist/src/resources/beta/datasets.ts +4 -9
- package/dist/src/resources/chat/chat.ts +36 -33
- package/dist/src/resources/chat/completions.ts +307 -811
- package/dist/src/resources/completions.ts +10 -4
- package/dist/src/resources/conversations/conversations.ts +121 -1
- package/dist/src/resources/conversations/items.ts +477 -6
- package/dist/src/resources/embeddings.ts +8 -0
- package/dist/src/resources/files.ts +12 -9
- package/dist/src/resources/index.ts +0 -18
- package/dist/src/resources/inspect.ts +3 -0
- package/dist/src/resources/models/index.ts +0 -2
- package/dist/src/resources/models/models.ts +7 -82
- package/dist/src/resources/moderations.ts +3 -0
- package/dist/src/resources/prompts/prompts.ts +3 -0
- package/dist/src/resources/prompts/versions.ts +3 -0
- package/dist/src/resources/providers.ts +3 -0
- package/dist/src/resources/responses/input-items.ts +128 -2
- package/dist/src/resources/responses/responses.ts +706 -7
- package/dist/src/resources/routes.ts +3 -0
- package/dist/src/resources/safety.ts +15 -12
- package/dist/src/resources/vector-io.ts +4 -4
- package/dist/src/resources/vector-stores/file-batches.ts +57 -0
- package/dist/src/resources/vector-stores/files.ts +117 -3
- package/dist/src/resources/vector-stores/vector-stores.ts +59 -2
- package/dist/src/streaming.ts +24 -6
- package/dist/src/version.ts +1 -1
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.js +21 -6
- package/dist/streaming.js.map +1 -1
- package/dist/streaming.mjs +21 -6
- package/dist/streaming.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/scripts/mock +21 -10
- package/scripts/test +8 -8
- package/src/core.ts +10 -21
- package/src/index.ts +51 -48
- package/{dist/src/resources/alpha/post-training.ts → src/internal/utils/query.ts} +5 -1
- package/src/resources/alpha/alpha.ts +0 -20
- package/src/resources/alpha/eval/eval.ts +3 -0
- package/src/resources/alpha/eval/jobs.ts +3 -0
- package/src/resources/alpha/index.ts +0 -8
- package/src/resources/alpha/inference.ts +8 -0
- package/src/resources/batches.ts +8 -0
- package/src/resources/beta/datasets.ts +4 -9
- package/src/resources/chat/chat.ts +36 -33
- package/src/resources/chat/completions.ts +307 -811
- package/src/resources/completions.ts +10 -4
- package/src/resources/conversations/conversations.ts +121 -1
- package/src/resources/conversations/items.ts +477 -6
- package/src/resources/embeddings.ts +8 -0
- package/src/resources/files.ts +12 -9
- package/src/resources/index.ts +0 -18
- package/src/resources/inspect.ts +3 -0
- package/src/resources/models/index.ts +0 -2
- package/src/resources/models/models.ts +7 -82
- package/src/resources/moderations.ts +3 -0
- package/src/resources/prompts/prompts.ts +3 -0
- package/src/resources/prompts/versions.ts +3 -0
- package/src/resources/providers.ts +3 -0
- package/src/resources/responses/input-items.ts +128 -2
- package/src/resources/responses/responses.ts +706 -7
- package/src/resources/routes.ts +3 -0
- package/src/resources/safety.ts +15 -12
- package/src/resources/vector-io.ts +4 -4
- package/src/resources/vector-stores/file-batches.ts +57 -0
- package/src/resources/vector-stores/files.ts +117 -3
- package/src/resources/vector-stores/vector-stores.ts +59 -2
- package/src/streaming.ts +24 -6
- package/src/version.ts +1 -1
- package/tests/api-resources/beta/datasets.test.ts +4 -10
- package/tests/api-resources/chat/completions.test.ts +2 -0
- package/tests/api-resources/files.test.ts +2 -2
- package/tests/api-resources/models/models.test.ts +0 -39
- package/tests/api-resources/responses/responses.test.ts +10 -1
- package/tests/api-resources/vector-stores/file-batches.test.ts +1 -1
- package/tests/api-resources/vector-stores/files.test.ts +1 -1
- package/tests/api-resources/vector-stores/vector-stores.test.ts +1 -1
- package/tests/stringifyQuery.test.ts +2 -4
- package/dist/resources/alpha/post-training/index.d.ts +0 -3
- package/dist/resources/alpha/post-training/index.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/index.js +0 -15
- package/dist/resources/alpha/post-training/index.js.map +0 -1
- package/dist/resources/alpha/post-training/index.mjs +0 -10
- package/dist/resources/alpha/post-training/index.mjs.map +0 -1
- package/dist/resources/alpha/post-training/job.d.ts +0 -104
- package/dist/resources/alpha/post-training/job.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/job.js +0 -42
- package/dist/resources/alpha/post-training/job.js.map +0 -1
- package/dist/resources/alpha/post-training/job.mjs +0 -38
- package/dist/resources/alpha/post-training/job.mjs.map +0 -1
- package/dist/resources/alpha/post-training/post-training.d.ts +0 -269
- package/dist/resources/alpha/post-training/post-training.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/post-training.js.map +0 -1
- package/dist/resources/alpha/post-training/post-training.mjs +0 -30
- package/dist/resources/alpha/post-training/post-training.mjs.map +0 -1
- package/dist/resources/alpha/post-training.d.ts +0 -2
- package/dist/resources/alpha/post-training.d.ts.map +0 -1
- package/dist/resources/alpha/post-training.js +0 -25
- package/dist/resources/alpha/post-training.js.map +0 -1
- package/dist/resources/alpha/post-training.mjs.map +0 -1
- package/dist/resources/tool-runtime.d.ts +0 -152
- package/dist/resources/tool-runtime.d.ts.map +0 -1
- package/dist/resources/tool-runtime.js +0 -30
- package/dist/resources/tool-runtime.js.map +0 -1
- package/dist/resources/tool-runtime.mjs +0 -26
- package/dist/resources/tool-runtime.mjs.map +0 -1
- package/dist/resources/toolgroups.d.ts +0 -91
- package/dist/resources/toolgroups.d.ts.map +0 -1
- package/dist/resources/toolgroups.js +0 -54
- package/dist/resources/toolgroups.js.map +0 -1
- package/dist/resources/toolgroups.mjs +0 -50
- package/dist/resources/toolgroups.mjs.map +0 -1
- package/dist/resources/tools.d.ts +0 -26
- package/dist/resources/tools.d.ts.map +0 -1
- package/dist/resources/tools.js +0 -30
- package/dist/resources/tools.js.map +0 -1
- package/dist/resources/tools.mjs +0 -26
- package/dist/resources/tools.mjs.map +0 -1
- package/dist/src/resources/alpha/post-training/index.ts +0 -17
- package/dist/src/resources/alpha/post-training/job.ts +0 -161
- package/dist/src/resources/alpha/post-training/post-training.ts +0 -385
- package/dist/src/resources/tool-runtime.ts +0 -217
- package/dist/src/resources/toolgroups.ts +0 -135
- package/dist/src/resources/tools.ts +0 -52
- package/src/resources/alpha/post-training/index.ts +0 -17
- package/src/resources/alpha/post-training/job.ts +0 -161
- package/src/resources/alpha/post-training/post-training.ts +0 -385
- package/src/resources/tool-runtime.ts +0 -217
- package/src/resources/toolgroups.ts +0 -135
- package/src/resources/tools.ts +0 -52
- package/tests/api-resources/alpha/post-training/job.test.ts +0 -86
- package/tests/api-resources/alpha/post-training/post-training.test.ts +0 -134
- package/tests/api-resources/tool-runtime.test.ts +0 -68
- package/tests/api-resources/toolgroups.test.ts +0 -91
- package/tests/api-resources/tools.test.ts +0 -57
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
name: CI
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
|
-
branches
|
|
5
|
-
- '
|
|
6
|
-
- '
|
|
7
|
-
- '
|
|
8
|
-
- 'stl-preview-
|
|
9
|
-
- '
|
|
4
|
+
branches:
|
|
5
|
+
- '**'
|
|
6
|
+
- '!integrated/**'
|
|
7
|
+
- '!stl-preview-head/**'
|
|
8
|
+
- '!stl-preview-base/**'
|
|
9
|
+
- '!generated'
|
|
10
|
+
- '!codegen/**'
|
|
11
|
+
- 'codegen/stl/**'
|
|
10
12
|
pull_request:
|
|
11
13
|
branches-ignore:
|
|
12
14
|
- 'stl-preview-head/**'
|
|
@@ -17,7 +19,7 @@ jobs:
|
|
|
17
19
|
timeout-minutes: 10
|
|
18
20
|
name: lint
|
|
19
21
|
runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
|
|
20
|
-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
|
|
22
|
+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
|
|
21
23
|
steps:
|
|
22
24
|
- uses: actions/checkout@v6
|
|
23
25
|
|
|
@@ -36,7 +38,7 @@ jobs:
|
|
|
36
38
|
timeout-minutes: 5
|
|
37
39
|
name: build
|
|
38
40
|
runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
|
|
39
|
-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
|
|
41
|
+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
|
|
40
42
|
permissions:
|
|
41
43
|
contents: read
|
|
42
44
|
id-token: write
|
|
@@ -55,14 +57,18 @@ jobs:
|
|
|
55
57
|
run: ./scripts/build
|
|
56
58
|
|
|
57
59
|
- name: Get GitHub OIDC Token
|
|
58
|
-
if:
|
|
60
|
+
if: |-
|
|
61
|
+
github.repository == 'stainless-sdks/llama-stack-client-node' &&
|
|
62
|
+
!startsWith(github.ref, 'refs/heads/stl/')
|
|
59
63
|
id: github-oidc
|
|
60
64
|
uses: actions/github-script@v8
|
|
61
65
|
with:
|
|
62
66
|
script: core.setOutput('github_token', await core.getIDToken());
|
|
63
67
|
|
|
64
68
|
- name: Upload tarball
|
|
65
|
-
if:
|
|
69
|
+
if: |-
|
|
70
|
+
github.repository == 'stainless-sdks/llama-stack-client-node' &&
|
|
71
|
+
!startsWith(github.ref, 'refs/heads/stl/')
|
|
66
72
|
env:
|
|
67
73
|
URL: https://pkg.stainless.com/s
|
|
68
74
|
AUTH: ${{ steps.github-oidc.outputs.github_token }}
|
package/.gitignore
CHANGED
package/.stats.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
configured_endpoints:
|
|
2
|
-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-
|
|
3
|
-
openapi_spec_hash:
|
|
4
|
-
config_hash:
|
|
1
|
+
configured_endpoints: 92
|
|
2
|
+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-a6b10a7f923a8cf216108cd794ccbac5d4114193ba888fea0c1288548b28f37e.yml
|
|
3
|
+
openapi_spec_hash: ed2df655e1a9041bf71adfb37ed651fe
|
|
4
|
+
config_hash: d8a05907bd87286473cdf868da7d2ede
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0-alpha.3 (2026-04-02)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0-alpha.2...v0.5.0-alpha.3](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.5.0-alpha.2...v0.5.0-alpha.3)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* eliminate GET /chat/completions/{completion_id} conformance issues
|
|
10
|
+
* rename agents API to responses API
|
|
11
|
+
* eliminate /files/{file_id} GET differences
|
|
12
|
+
* improve consistency of post-training API endpoints
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* accept list content blocks in Responses API function_call_output ([9a2e825](https://github.com/llamastack/llama-stack-client-typescript/commit/9a2e82551698ce4b0f127e9b466504568feade84))
|
|
17
|
+
* Add prompt_cache_key parameter support ([e6399ef](https://github.com/llamastack/llama-stack-client-typescript/commit/e6399ef9e8b34b6cf3238c4c8f8b7d0134a8788e))
|
|
18
|
+
* add reasoning as valid conversation item ([25df02e](https://github.com/llamastack/llama-stack-client-typescript/commit/25df02e8fdc4e98af98c2271b5aeee8fcdedf865))
|
|
19
|
+
* add reasoning output types to OpenAI Responses API spec ([652e5db](https://github.com/llamastack/llama-stack-client-typescript/commit/652e5db44b81c83830ca1d39c05ea0c7b738415c))
|
|
20
|
+
* add skip_model_availability to openai_mixin for remote models ([51a4f50](https://github.com/llamastack/llama-stack-client-typescript/commit/51a4f502e896045621f4aac9e75c19418490801e))
|
|
21
|
+
* Add stream_options parameter support ([992f337](https://github.com/llamastack/llama-stack-client-typescript/commit/992f337ad0a9f0d956ab0bbbcbdbc1b3367ee53c))
|
|
22
|
+
* add support for 'frequency_penalty' param to Responses API ([c0a5753](https://github.com/llamastack/llama-stack-client-typescript/commit/c0a5753ffb14bba9b9b8b61ab6045087a30f8576))
|
|
23
|
+
* add support for 'presence_penalty' param to Responses API ([8a1b472](https://github.com/llamastack/llama-stack-client-typescript/commit/8a1b47258a72741c9a32724af25033e2545b7ba5))
|
|
24
|
+
* add support for /responses background parameter ([c7e9581](https://github.com/llamastack/llama-stack-client-typescript/commit/c7e9581d7df28f5c97dd9ecc903c942f33972649))
|
|
25
|
+
* Add top_logprobs parameter support ([1ff427f](https://github.com/llamastack/llama-stack-client-typescript/commit/1ff427f5265874e0d90fe1346154f71b21d20d9e))
|
|
26
|
+
* add top_p parameter support to responses API ([76bacd4](https://github.com/llamastack/llama-stack-client-typescript/commit/76bacd49f160ba9ab0740269ad7116340f265e58))
|
|
27
|
+
* Add truncation parameter support ([3119d6b](https://github.com/llamastack/llama-stack-client-typescript/commit/3119d6bb8a1d38d6fa1958daeed0fb5dbb12b1e1))
|
|
28
|
+
* **api:** support extra_body pass-through in responses API ([d707494](https://github.com/llamastack/llama-stack-client-typescript/commit/d70749437992017bd331c17f02e09cb093205900))
|
|
29
|
+
* eliminate /files/{file_id} GET differences ([d5595b1](https://github.com/llamastack/llama-stack-client-typescript/commit/d5595b10679b717e17b1c79b1a3a17049de2dade))
|
|
30
|
+
* eliminate GET /chat/completions/{completion_id} conformance issues ([1536e1a](https://github.com/llamastack/llama-stack-client-typescript/commit/1536e1a3e089cfe08582f044394f94c97dc7d60b))
|
|
31
|
+
* improve consistency of post-training API endpoints ([93376fc](https://github.com/llamastack/llama-stack-client-typescript/commit/93376fcbe864d4e8becd957301e6df15b3d803f8))
|
|
32
|
+
* **inference:** bidirectional reasoning token passthrough for chat completions ([cd3c600](https://github.com/llamastack/llama-stack-client-typescript/commit/cd3c6000e16cd52a830b8fa48fe4781989ad7b9a))
|
|
33
|
+
* **responses:** add cancel endpoint for background responses ([df4292b](https://github.com/llamastack/llama-stack-client-typescript/commit/df4292b354950cc83db605bc0d5334c5a80fe5a1))
|
|
34
|
+
* **vector_io:** Implement Contextual Retrieval for improved RAG search quality ([abf9c27](https://github.com/llamastack/llama-stack-client-typescript/commit/abf9c27dcee824cd87f5b1889c456d99a7a94fb9))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* align chat completion usage schema with OpenAI spec ([6fa6eb8](https://github.com/llamastack/llama-stack-client-typescript/commit/6fa6eb87d96902586d4feb82747a5cdf99622045))
|
|
40
|
+
* **client:** preserve URL params already embedded in path ([2bd57de](https://github.com/llamastack/llama-stack-client-typescript/commit/2bd57deec573fa1ef389d8c798e2b9588f4ddbbd))
|
|
41
|
+
* **docs/contributing:** correct pnpm link command ([8aa7f85](https://github.com/llamastack/llama-stack-client-typescript/commit/8aa7f856abb9ee612cc6ea97e30984b29620fd1b))
|
|
42
|
+
* fix request delays for retrying to be more respectful of high requested delays ([0b0080a](https://github.com/llamastack/llama-stack-client-typescript/commit/0b0080af337cafe4e69c446756a227270c947c2b))
|
|
43
|
+
* **inference:** improve chat completions OpenAI conformance ([eb6414c](https://github.com/llamastack/llama-stack-client-typescript/commit/eb6414c133c7f8e67e1a78e44da0322450d13ed3))
|
|
44
|
+
* **inference:** use flat response message model for chat/completions ([d7033cd](https://github.com/llamastack/llama-stack-client-typescript/commit/d7033cd2af32a823514135971b3775037992393c))
|
|
45
|
+
* remove duplicate dataset_id parameter in append-rows endpoint ([fe105ab](https://github.com/llamastack/llama-stack-client-typescript/commit/fe105ab03ee5ef9c3eb2046c2e225bff08472f45))
|
|
46
|
+
* **responses:** achieve full OpenResponses conformance — 6/6 tests passing ([6537552](https://github.com/llamastack/llama-stack-client-typescript/commit/653755208f5de83bf9a8cf879c3f77abf5ba88d3))
|
|
47
|
+
* **stainless:** handle [DONE] SSE terminator in streaming responses ([3f9d067](https://github.com/llamastack/llama-stack-client-typescript/commit/3f9d06785dcb9b9e8279d0e54fdc0d4f0e1afd91))
|
|
48
|
+
* **vector_io:** align Protocol signatures with request models ([11a1a20](https://github.com/llamastack/llama-stack-client-typescript/commit/11a1a20e82bae62f8210cb26091d3df8bf648f15))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Chores
|
|
52
|
+
|
|
53
|
+
* **api:** minor updates ([1286b39](https://github.com/llamastack/llama-stack-client-typescript/commit/1286b396a69ae48b41ad125405f005264339116d))
|
|
54
|
+
* **ci:** skip lint on metadata-only changes ([7a0e6aa](https://github.com/llamastack/llama-stack-client-typescript/commit/7a0e6aa16e489da90279968b3db410a2808d7897))
|
|
55
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([b6ec8ca](https://github.com/llamastack/llama-stack-client-typescript/commit/b6ec8caf1dcd5db7088a0762c7e5276b05e824e3))
|
|
56
|
+
* **docs:** add missing descriptions ([a1ed726](https://github.com/llamastack/llama-stack-client-typescript/commit/a1ed7261f3858be53a768817bf58d8f15ce412a6))
|
|
57
|
+
* **internal:** avoid type checking errors with ts-reset ([2cffe20](https://github.com/llamastack/llama-stack-client-typescript/commit/2cffe2040a77c3310db5d1803fc3800b4dd72f28))
|
|
58
|
+
* **internal:** codegen related update ([4feb3b7](https://github.com/llamastack/llama-stack-client-typescript/commit/4feb3b71dce9088968439ab554c8ee6998114d2f))
|
|
59
|
+
* **internal:** move stringifyQuery implementation to internal function ([03a5b05](https://github.com/llamastack/llama-stack-client-typescript/commit/03a5b052d5406755515edb07e04e8b4fd7750234))
|
|
60
|
+
* **internal:** tweak CI branches ([cb4c926](https://github.com/llamastack/llama-stack-client-typescript/commit/cb4c926869316cfbea09e9b1414456b584761d47))
|
|
61
|
+
* **internal:** update gitignore ([651b312](https://github.com/llamastack/llama-stack-client-typescript/commit/651b31248f2dea6a0593b65aa2121087857a7c25))
|
|
62
|
+
* **internal:** update multipart form array serialization ([a2245ee](https://github.com/llamastack/llama-stack-client-typescript/commit/a2245ee1c098f51e6cac578b29b1c26ec2757ebb))
|
|
63
|
+
* **test:** do not count install time for mock server timeout ([bfb35fe](https://github.com/llamastack/llama-stack-client-typescript/commit/bfb35fe36446caea4edc9dddadc15b345e61f855))
|
|
64
|
+
* **tests:** bump steady to v0.19.4 ([877e07d](https://github.com/llamastack/llama-stack-client-typescript/commit/877e07d2fb70b22761c0f16137dfb04d6003997e))
|
|
65
|
+
* **tests:** bump steady to v0.19.5 ([d05e2db](https://github.com/llamastack/llama-stack-client-typescript/commit/d05e2db034a1dbd0c4c4c6ceaac4c410b17fa5a2))
|
|
66
|
+
* **tests:** bump steady to v0.19.6 ([acf26c0](https://github.com/llamastack/llama-stack-client-typescript/commit/acf26c06bc0cc244bca082b1060d7477f1fa27e8))
|
|
67
|
+
* **tests:** bump steady to v0.19.7 ([216ce02](https://github.com/llamastack/llama-stack-client-typescript/commit/216ce02d4b4a76b908389e848eaddad5e6124ceb))
|
|
68
|
+
* **tests:** bump steady to v0.20.1 ([502633c](https://github.com/llamastack/llama-stack-client-typescript/commit/502633c9814fa7d72b60717f0270438c2af14a28))
|
|
69
|
+
* **tests:** bump steady to v0.20.2 ([fa7a238](https://github.com/llamastack/llama-stack-client-typescript/commit/fa7a2389c99ff553cae2d126e8c6855f7e0dee02))
|
|
70
|
+
* update mock server docs ([0d438e8](https://github.com/llamastack/llama-stack-client-typescript/commit/0d438e81af56cdc6ec91ac6c3286dedc4dc9190f))
|
|
71
|
+
* update placeholder string ([62e1d34](https://github.com/llamastack/llama-stack-client-typescript/commit/62e1d34d77f46047eab860ba537164de06c74824))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Refactors
|
|
75
|
+
|
|
76
|
+
* remove deprecated register/unregister model endpoints ([1247b1d](https://github.com/llamastack/llama-stack-client-typescript/commit/1247b1dfc7d9541c8e90dffa79c05652ccb59f75))
|
|
77
|
+
* remove fine_tuning API ([81f12ca](https://github.com/llamastack/llama-stack-client-typescript/commit/81f12ca417cdbc00bcb37148c37a93af697b5439))
|
|
78
|
+
* remove tool_groups from public API and auto-register from provider specs ([07f07b3](https://github.com/llamastack/llama-stack-client-typescript/commit/07f07b3ad78ed8be421c44d3c189c795b39fba93))
|
|
79
|
+
* rename agents API to responses API ([0d16ccc](https://github.com/llamastack/llama-stack-client-typescript/commit/0d16cccce2e7b4c2e461186cc4cc2a52e7bac4ce))
|
|
80
|
+
* rename rag-runtime provider to file-search ([5e73282](https://github.com/llamastack/llama-stack-client-typescript/commit/5e73282c2cee739eac97fca8dc6d8cda99d5b2ce))
|
|
81
|
+
* **tests:** switch from prism to steady ([2e25672](https://github.com/llamastack/llama-stack-client-typescript/commit/2e25672fe9d57614833b0dd9f2254a6ba12ce699))
|
|
82
|
+
|
|
3
83
|
## 0.5.0-alpha.2 (2026-02-05)
|
|
4
84
|
|
|
5
85
|
Full Changelog: [v0.4.0-alpha.7...v0.5.0-alpha.2](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.4.0-alpha.7...v0.5.0-alpha.2)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -65,12 +65,12 @@ $ npm link llama-stack-client
|
|
|
65
65
|
# With pnpm
|
|
66
66
|
$ pnpm link --global
|
|
67
67
|
$ cd ../my-package
|
|
68
|
-
$ pnpm link
|
|
68
|
+
$ pnpm link --global llama-stack-client
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
## Running tests
|
|
72
72
|
|
|
73
|
-
Most tests require you to [set up a mock server](https://github.com/
|
|
73
|
+
Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.
|
|
74
74
|
|
|
75
75
|
```sh
|
|
76
76
|
$ npx @stainless-api/prism-cli@5.15.0 prism mock path/to/your/openapi.yml
|
package/README.md
CHANGED
|
@@ -30,6 +30,28 @@ const client = new LlamaStackClient();
|
|
|
30
30
|
const models = await client.models.list();
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Streaming responses
|
|
34
|
+
|
|
35
|
+
We provide support for streaming responses using Server Sent Events (SSE).
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import LlamaStackClient from 'llama-stack-client';
|
|
39
|
+
|
|
40
|
+
const client = new LlamaStackClient();
|
|
41
|
+
|
|
42
|
+
const stream = await client.chat.completions.create({
|
|
43
|
+
messages: [{ content: 'string', role: 'user' }],
|
|
44
|
+
model: 'model',
|
|
45
|
+
stream: true,
|
|
46
|
+
});
|
|
47
|
+
for await (const chatCompletionChunk of stream) {
|
|
48
|
+
console.log(chatCompletionChunk.id);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If you need to cancel a stream, you can `break` from the loop
|
|
53
|
+
or call `stream.controller.abort()`.
|
|
54
|
+
|
|
33
55
|
### Request & Response types
|
|
34
56
|
|
|
35
57
|
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
package/api.md
CHANGED
|
@@ -16,45 +16,6 @@ Types:
|
|
|
16
16
|
- <code><a href="./src/resources/shared.ts">SystemMessage</a></code>
|
|
17
17
|
- <code><a href="./src/resources/shared.ts">VersionInfo</a></code>
|
|
18
18
|
|
|
19
|
-
# Toolgroups
|
|
20
|
-
|
|
21
|
-
Types:
|
|
22
|
-
|
|
23
|
-
- <code><a href="./src/resources/toolgroups.ts">ListToolGroupsResponse</a></code>
|
|
24
|
-
- <code><a href="./src/resources/toolgroups.ts">ToolGroup</a></code>
|
|
25
|
-
- <code><a href="./src/resources/toolgroups.ts">ToolgroupListResponse</a></code>
|
|
26
|
-
|
|
27
|
-
Methods:
|
|
28
|
-
|
|
29
|
-
- <code title="get /v1/toolgroups">client.toolgroups.<a href="./src/resources/toolgroups.ts">list</a>() -> ToolgroupListResponse</code>
|
|
30
|
-
- <code title="get /v1/toolgroups/{toolgroup_id}">client.toolgroups.<a href="./src/resources/toolgroups.ts">get</a>(toolgroupId) -> ToolGroup</code>
|
|
31
|
-
- <code title="post /v1/toolgroups">client.toolgroups.<a href="./src/resources/toolgroups.ts">register</a>({ ...params }) -> void</code>
|
|
32
|
-
- <code title="delete /v1/toolgroups/{toolgroup_id}">client.toolgroups.<a href="./src/resources/toolgroups.ts">unregister</a>(toolgroupId) -> void</code>
|
|
33
|
-
|
|
34
|
-
# Tools
|
|
35
|
-
|
|
36
|
-
Types:
|
|
37
|
-
|
|
38
|
-
- <code><a href="./src/resources/tools.ts">ToolListResponse</a></code>
|
|
39
|
-
|
|
40
|
-
Methods:
|
|
41
|
-
|
|
42
|
-
- <code title="get /v1/tools">client.tools.<a href="./src/resources/tools.ts">list</a>({ ...params }) -> ToolListResponse</code>
|
|
43
|
-
- <code title="get /v1/tools/{tool_name}">client.tools.<a href="./src/resources/tools.ts">get</a>(toolName) -> ToolDef</code>
|
|
44
|
-
|
|
45
|
-
# ToolRuntime
|
|
46
|
-
|
|
47
|
-
Types:
|
|
48
|
-
|
|
49
|
-
- <code><a href="./src/resources/tool-runtime.ts">ToolDef</a></code>
|
|
50
|
-
- <code><a href="./src/resources/tool-runtime.ts">ToolInvocationResult</a></code>
|
|
51
|
-
- <code><a href="./src/resources/tool-runtime.ts">ToolRuntimeListToolsResponse</a></code>
|
|
52
|
-
|
|
53
|
-
Methods:
|
|
54
|
-
|
|
55
|
-
- <code title="post /v1/tool-runtime/invoke">client.toolRuntime.<a href="./src/resources/tool-runtime.ts">invokeTool</a>({ ...params }) -> ToolInvocationResult</code>
|
|
56
|
-
- <code title="get /v1/tool-runtime/list-tools">client.toolRuntime.<a href="./src/resources/tool-runtime.ts">listTools</a>({ ...params }) -> ToolRuntimeListToolsResponse</code>
|
|
57
|
-
|
|
58
19
|
# Responses
|
|
59
20
|
|
|
60
21
|
Types:
|
|
@@ -249,14 +210,11 @@ Types:
|
|
|
249
210
|
- <code><a href="./src/resources/models/models.ts">Model</a></code>
|
|
250
211
|
- <code><a href="./src/resources/models/models.ts">ModelRetrieveResponse</a></code>
|
|
251
212
|
- <code><a href="./src/resources/models/models.ts">ModelListResponse</a></code>
|
|
252
|
-
- <code><a href="./src/resources/models/models.ts">ModelRegisterResponse</a></code>
|
|
253
213
|
|
|
254
214
|
Methods:
|
|
255
215
|
|
|
256
216
|
- <code title="get /v1/models/{model_id}">client.models.<a href="./src/resources/models/models.ts">retrieve</a>(modelId) -> ModelRetrieveResponse</code>
|
|
257
217
|
- <code title="get /v1/models">client.models.<a href="./src/resources/models/models.ts">list</a>() -> ModelListResponse</code>
|
|
258
|
-
- <code title="post /v1/models">client.models.<a href="./src/resources/models/models.ts">register</a>({ ...params }) -> ModelRegisterResponse</code>
|
|
259
|
-
- <code title="delete /v1/models/{model_id}">client.models.<a href="./src/resources/models/models.ts">unregister</a>(modelId) -> void</code>
|
|
260
218
|
|
|
261
219
|
## OpenAI
|
|
262
220
|
|
|
@@ -363,7 +321,7 @@ Methods:
|
|
|
363
321
|
- <code title="get /v1/files/{file_id}">client.files.<a href="./src/resources/files.ts">retrieve</a>(fileId) -> File</code>
|
|
364
322
|
- <code title="get /v1/files">client.files.<a href="./src/resources/files.ts">list</a>({ ...params }) -> FilesOpenAICursorPage</code>
|
|
365
323
|
- <code title="delete /v1/files/{file_id}">client.files.<a href="./src/resources/files.ts">delete</a>(fileId) -> DeleteFileResponse</code>
|
|
366
|
-
- <code title="get /v1/files/{file_id}/content">client.files.<a href="./src/resources/files.ts">content</a>(fileId) ->
|
|
324
|
+
- <code title="get /v1/files/{file_id}/content">client.files.<a href="./src/resources/files.ts">content</a>(fileId) -> string</code>
|
|
367
325
|
|
|
368
326
|
# Batches
|
|
369
327
|
|
|
@@ -383,34 +341,6 @@ Methods:
|
|
|
383
341
|
|
|
384
342
|
# Alpha
|
|
385
343
|
|
|
386
|
-
## PostTraining
|
|
387
|
-
|
|
388
|
-
Types:
|
|
389
|
-
|
|
390
|
-
- <code><a href="./src/resources/alpha/post-training/post-training.ts">AlgorithmConfig</a></code>
|
|
391
|
-
- <code><a href="./src/resources/alpha/post-training/post-training.ts">ListPostTrainingJobsResponse</a></code>
|
|
392
|
-
- <code><a href="./src/resources/alpha/post-training/post-training.ts">PostTrainingJob</a></code>
|
|
393
|
-
|
|
394
|
-
Methods:
|
|
395
|
-
|
|
396
|
-
- <code title="post /v1alpha/post-training/preference-optimize">client.alpha.postTraining.<a href="./src/resources/alpha/post-training/post-training.ts">preferenceOptimize</a>({ ...params }) -> PostTrainingJob</code>
|
|
397
|
-
- <code title="post /v1alpha/post-training/supervised-fine-tune">client.alpha.postTraining.<a href="./src/resources/alpha/post-training/post-training.ts">supervisedFineTune</a>({ ...params }) -> PostTrainingJob</code>
|
|
398
|
-
|
|
399
|
-
### Job
|
|
400
|
-
|
|
401
|
-
Types:
|
|
402
|
-
|
|
403
|
-
- <code><a href="./src/resources/alpha/post-training/job.ts">JobListResponse</a></code>
|
|
404
|
-
- <code><a href="./src/resources/alpha/post-training/job.ts">JobArtifactsResponse</a></code>
|
|
405
|
-
- <code><a href="./src/resources/alpha/post-training/job.ts">JobStatusResponse</a></code>
|
|
406
|
-
|
|
407
|
-
Methods:
|
|
408
|
-
|
|
409
|
-
- <code title="get /v1alpha/post-training/jobs">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">list</a>() -> JobListResponse</code>
|
|
410
|
-
- <code title="get /v1alpha/post-training/job/artifacts">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">artifacts</a>() -> JobArtifactsResponse</code>
|
|
411
|
-
- <code title="post /v1alpha/post-training/job/cancel">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">cancel</a>() -> void</code>
|
|
412
|
-
- <code title="get /v1alpha/post-training/job/status">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">status</a>() -> JobStatusResponse</code>
|
|
413
|
-
|
|
414
344
|
## Benchmarks
|
|
415
345
|
|
|
416
346
|
Types:
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0-alpha.3 (2026-04-02)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0-alpha.2...v0.5.0-alpha.3](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.5.0-alpha.2...v0.5.0-alpha.3)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* eliminate GET /chat/completions/{completion_id} conformance issues
|
|
10
|
+
* rename agents API to responses API
|
|
11
|
+
* eliminate /files/{file_id} GET differences
|
|
12
|
+
* improve consistency of post-training API endpoints
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* accept list content blocks in Responses API function_call_output ([9a2e825](https://github.com/llamastack/llama-stack-client-typescript/commit/9a2e82551698ce4b0f127e9b466504568feade84))
|
|
17
|
+
* Add prompt_cache_key parameter support ([e6399ef](https://github.com/llamastack/llama-stack-client-typescript/commit/e6399ef9e8b34b6cf3238c4c8f8b7d0134a8788e))
|
|
18
|
+
* add reasoning as valid conversation item ([25df02e](https://github.com/llamastack/llama-stack-client-typescript/commit/25df02e8fdc4e98af98c2271b5aeee8fcdedf865))
|
|
19
|
+
* add reasoning output types to OpenAI Responses API spec ([652e5db](https://github.com/llamastack/llama-stack-client-typescript/commit/652e5db44b81c83830ca1d39c05ea0c7b738415c))
|
|
20
|
+
* add skip_model_availability to openai_mixin for remote models ([51a4f50](https://github.com/llamastack/llama-stack-client-typescript/commit/51a4f502e896045621f4aac9e75c19418490801e))
|
|
21
|
+
* Add stream_options parameter support ([992f337](https://github.com/llamastack/llama-stack-client-typescript/commit/992f337ad0a9f0d956ab0bbbcbdbc1b3367ee53c))
|
|
22
|
+
* add support for 'frequency_penalty' param to Responses API ([c0a5753](https://github.com/llamastack/llama-stack-client-typescript/commit/c0a5753ffb14bba9b9b8b61ab6045087a30f8576))
|
|
23
|
+
* add support for 'presence_penalty' param to Responses API ([8a1b472](https://github.com/llamastack/llama-stack-client-typescript/commit/8a1b47258a72741c9a32724af25033e2545b7ba5))
|
|
24
|
+
* add support for /responses background parameter ([c7e9581](https://github.com/llamastack/llama-stack-client-typescript/commit/c7e9581d7df28f5c97dd9ecc903c942f33972649))
|
|
25
|
+
* Add top_logprobs parameter support ([1ff427f](https://github.com/llamastack/llama-stack-client-typescript/commit/1ff427f5265874e0d90fe1346154f71b21d20d9e))
|
|
26
|
+
* add top_p parameter support to responses API ([76bacd4](https://github.com/llamastack/llama-stack-client-typescript/commit/76bacd49f160ba9ab0740269ad7116340f265e58))
|
|
27
|
+
* Add truncation parameter support ([3119d6b](https://github.com/llamastack/llama-stack-client-typescript/commit/3119d6bb8a1d38d6fa1958daeed0fb5dbb12b1e1))
|
|
28
|
+
* **api:** support extra_body pass-through in responses API ([d707494](https://github.com/llamastack/llama-stack-client-typescript/commit/d70749437992017bd331c17f02e09cb093205900))
|
|
29
|
+
* eliminate /files/{file_id} GET differences ([d5595b1](https://github.com/llamastack/llama-stack-client-typescript/commit/d5595b10679b717e17b1c79b1a3a17049de2dade))
|
|
30
|
+
* eliminate GET /chat/completions/{completion_id} conformance issues ([1536e1a](https://github.com/llamastack/llama-stack-client-typescript/commit/1536e1a3e089cfe08582f044394f94c97dc7d60b))
|
|
31
|
+
* improve consistency of post-training API endpoints ([93376fc](https://github.com/llamastack/llama-stack-client-typescript/commit/93376fcbe864d4e8becd957301e6df15b3d803f8))
|
|
32
|
+
* **inference:** bidirectional reasoning token passthrough for chat completions ([cd3c600](https://github.com/llamastack/llama-stack-client-typescript/commit/cd3c6000e16cd52a830b8fa48fe4781989ad7b9a))
|
|
33
|
+
* **responses:** add cancel endpoint for background responses ([df4292b](https://github.com/llamastack/llama-stack-client-typescript/commit/df4292b354950cc83db605bc0d5334c5a80fe5a1))
|
|
34
|
+
* **vector_io:** Implement Contextual Retrieval for improved RAG search quality ([abf9c27](https://github.com/llamastack/llama-stack-client-typescript/commit/abf9c27dcee824cd87f5b1889c456d99a7a94fb9))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* align chat completion usage schema with OpenAI spec ([6fa6eb8](https://github.com/llamastack/llama-stack-client-typescript/commit/6fa6eb87d96902586d4feb82747a5cdf99622045))
|
|
40
|
+
* **client:** preserve URL params already embedded in path ([2bd57de](https://github.com/llamastack/llama-stack-client-typescript/commit/2bd57deec573fa1ef389d8c798e2b9588f4ddbbd))
|
|
41
|
+
* **docs/contributing:** correct pnpm link command ([8aa7f85](https://github.com/llamastack/llama-stack-client-typescript/commit/8aa7f856abb9ee612cc6ea97e30984b29620fd1b))
|
|
42
|
+
* fix request delays for retrying to be more respectful of high requested delays ([0b0080a](https://github.com/llamastack/llama-stack-client-typescript/commit/0b0080af337cafe4e69c446756a227270c947c2b))
|
|
43
|
+
* **inference:** improve chat completions OpenAI conformance ([eb6414c](https://github.com/llamastack/llama-stack-client-typescript/commit/eb6414c133c7f8e67e1a78e44da0322450d13ed3))
|
|
44
|
+
* **inference:** use flat response message model for chat/completions ([d7033cd](https://github.com/llamastack/llama-stack-client-typescript/commit/d7033cd2af32a823514135971b3775037992393c))
|
|
45
|
+
* remove duplicate dataset_id parameter in append-rows endpoint ([fe105ab](https://github.com/llamastack/llama-stack-client-typescript/commit/fe105ab03ee5ef9c3eb2046c2e225bff08472f45))
|
|
46
|
+
* **responses:** achieve full OpenResponses conformance — 6/6 tests passing ([6537552](https://github.com/llamastack/llama-stack-client-typescript/commit/653755208f5de83bf9a8cf879c3f77abf5ba88d3))
|
|
47
|
+
* **stainless:** handle [DONE] SSE terminator in streaming responses ([3f9d067](https://github.com/llamastack/llama-stack-client-typescript/commit/3f9d06785dcb9b9e8279d0e54fdc0d4f0e1afd91))
|
|
48
|
+
* **vector_io:** align Protocol signatures with request models ([11a1a20](https://github.com/llamastack/llama-stack-client-typescript/commit/11a1a20e82bae62f8210cb26091d3df8bf648f15))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Chores
|
|
52
|
+
|
|
53
|
+
* **api:** minor updates ([1286b39](https://github.com/llamastack/llama-stack-client-typescript/commit/1286b396a69ae48b41ad125405f005264339116d))
|
|
54
|
+
* **ci:** skip lint on metadata-only changes ([7a0e6aa](https://github.com/llamastack/llama-stack-client-typescript/commit/7a0e6aa16e489da90279968b3db410a2808d7897))
|
|
55
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([b6ec8ca](https://github.com/llamastack/llama-stack-client-typescript/commit/b6ec8caf1dcd5db7088a0762c7e5276b05e824e3))
|
|
56
|
+
* **docs:** add missing descriptions ([a1ed726](https://github.com/llamastack/llama-stack-client-typescript/commit/a1ed7261f3858be53a768817bf58d8f15ce412a6))
|
|
57
|
+
* **internal:** avoid type checking errors with ts-reset ([2cffe20](https://github.com/llamastack/llama-stack-client-typescript/commit/2cffe2040a77c3310db5d1803fc3800b4dd72f28))
|
|
58
|
+
* **internal:** codegen related update ([4feb3b7](https://github.com/llamastack/llama-stack-client-typescript/commit/4feb3b71dce9088968439ab554c8ee6998114d2f))
|
|
59
|
+
* **internal:** move stringifyQuery implementation to internal function ([03a5b05](https://github.com/llamastack/llama-stack-client-typescript/commit/03a5b052d5406755515edb07e04e8b4fd7750234))
|
|
60
|
+
* **internal:** tweak CI branches ([cb4c926](https://github.com/llamastack/llama-stack-client-typescript/commit/cb4c926869316cfbea09e9b1414456b584761d47))
|
|
61
|
+
* **internal:** update gitignore ([651b312](https://github.com/llamastack/llama-stack-client-typescript/commit/651b31248f2dea6a0593b65aa2121087857a7c25))
|
|
62
|
+
* **internal:** update multipart form array serialization ([a2245ee](https://github.com/llamastack/llama-stack-client-typescript/commit/a2245ee1c098f51e6cac578b29b1c26ec2757ebb))
|
|
63
|
+
* **test:** do not count install time for mock server timeout ([bfb35fe](https://github.com/llamastack/llama-stack-client-typescript/commit/bfb35fe36446caea4edc9dddadc15b345e61f855))
|
|
64
|
+
* **tests:** bump steady to v0.19.4 ([877e07d](https://github.com/llamastack/llama-stack-client-typescript/commit/877e07d2fb70b22761c0f16137dfb04d6003997e))
|
|
65
|
+
* **tests:** bump steady to v0.19.5 ([d05e2db](https://github.com/llamastack/llama-stack-client-typescript/commit/d05e2db034a1dbd0c4c4c6ceaac4c410b17fa5a2))
|
|
66
|
+
* **tests:** bump steady to v0.19.6 ([acf26c0](https://github.com/llamastack/llama-stack-client-typescript/commit/acf26c06bc0cc244bca082b1060d7477f1fa27e8))
|
|
67
|
+
* **tests:** bump steady to v0.19.7 ([216ce02](https://github.com/llamastack/llama-stack-client-typescript/commit/216ce02d4b4a76b908389e848eaddad5e6124ceb))
|
|
68
|
+
* **tests:** bump steady to v0.20.1 ([502633c](https://github.com/llamastack/llama-stack-client-typescript/commit/502633c9814fa7d72b60717f0270438c2af14a28))
|
|
69
|
+
* **tests:** bump steady to v0.20.2 ([fa7a238](https://github.com/llamastack/llama-stack-client-typescript/commit/fa7a2389c99ff553cae2d126e8c6855f7e0dee02))
|
|
70
|
+
* update mock server docs ([0d438e8](https://github.com/llamastack/llama-stack-client-typescript/commit/0d438e81af56cdc6ec91ac6c3286dedc4dc9190f))
|
|
71
|
+
* update placeholder string ([62e1d34](https://github.com/llamastack/llama-stack-client-typescript/commit/62e1d34d77f46047eab860ba537164de06c74824))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Refactors
|
|
75
|
+
|
|
76
|
+
* remove deprecated register/unregister model endpoints ([1247b1d](https://github.com/llamastack/llama-stack-client-typescript/commit/1247b1dfc7d9541c8e90dffa79c05652ccb59f75))
|
|
77
|
+
* remove fine_tuning API ([81f12ca](https://github.com/llamastack/llama-stack-client-typescript/commit/81f12ca417cdbc00bcb37148c37a93af697b5439))
|
|
78
|
+
* remove tool_groups from public API and auto-register from provider specs ([07f07b3](https://github.com/llamastack/llama-stack-client-typescript/commit/07f07b3ad78ed8be421c44d3c189c795b39fba93))
|
|
79
|
+
* rename agents API to responses API ([0d16ccc](https://github.com/llamastack/llama-stack-client-typescript/commit/0d16cccce2e7b4c2e461186cc4cc2a52e7bac4ce))
|
|
80
|
+
* rename rag-runtime provider to file-search ([5e73282](https://github.com/llamastack/llama-stack-client-typescript/commit/5e73282c2cee739eac97fca8dc6d8cda99d5b2ce))
|
|
81
|
+
* **tests:** switch from prism to steady ([2e25672](https://github.com/llamastack/llama-stack-client-typescript/commit/2e25672fe9d57614833b0dd9f2254a6ba12ce699))
|
|
82
|
+
|
|
3
83
|
## 0.5.0-alpha.2 (2026-02-05)
|
|
4
84
|
|
|
5
85
|
Full Changelog: [v0.4.0-alpha.7...v0.5.0-alpha.2](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.4.0-alpha.7...v0.5.0-alpha.2)
|
package/dist/README.md
CHANGED
|
@@ -30,6 +30,28 @@ const client = new LlamaStackClient();
|
|
|
30
30
|
const models = await client.models.list();
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Streaming responses
|
|
34
|
+
|
|
35
|
+
We provide support for streaming responses using Server Sent Events (SSE).
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import LlamaStackClient from 'llama-stack-client';
|
|
39
|
+
|
|
40
|
+
const client = new LlamaStackClient();
|
|
41
|
+
|
|
42
|
+
const stream = await client.chat.completions.create({
|
|
43
|
+
messages: [{ content: 'string', role: 'user' }],
|
|
44
|
+
model: 'model',
|
|
45
|
+
stream: true,
|
|
46
|
+
});
|
|
47
|
+
for await (const chatCompletionChunk of stream) {
|
|
48
|
+
console.log(chatCompletionChunk.id);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If you need to cancel a stream, you can `break` from the loop
|
|
53
|
+
or call `stream.controller.abort()`.
|
|
54
|
+
|
|
33
55
|
### Request & Response types
|
|
34
56
|
|
|
35
57
|
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
package/dist/core.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ export declare abstract class APIClient {
|
|
|
139
139
|
private makeRequest;
|
|
140
140
|
requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass, options: FinalRequestOptions): PagePromise<PageClass, Item>;
|
|
141
141
|
buildURL<Req>(path: string, query: Req | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
142
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
142
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
143
143
|
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
144
144
|
private shouldRetry;
|
|
145
145
|
private retryRequest;
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";;AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAEL,QAAQ,EAIT,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/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;AAEF,eAAO,MAAM,gBAAgB,UAAW,OAAO,KAAG,MAAM,GAAG,SAK1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,OAAO,KAAG,OAAO,GAAG,SAK7D,CAAC;AAGF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIlE;AAGD,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAExD;AAwBD,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,QAInD;AAaD,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpD;AACD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,eAAe,CAAC;AAE1F,eAAO,MAAM,iBAAiB,YAAa,GAAG,+BAE7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAAa,WAAW,GAAG,OAAO,UAAU,MAAM,KAAG,MAMlF,CAAC;AAEF,eAAO,MAAM,SAAS,YAAa,WAAW,GAAG,OAAO,UAAU,MAAM,KAAG,MAAM,GAAG,SA2BnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,QAAS,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAWzD,CAAC;AAEF,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE"}
|
package/dist/core.js
CHANGED
|
@@ -21,6 +21,7 @@ exports.isObj = exports.toBase64 = exports.getHeader = exports.getRequiredHeader
|
|
|
21
21
|
const version_1 = require("./version.js");
|
|
22
22
|
const streaming_1 = require("./streaming.js");
|
|
23
23
|
const error_1 = require("./error.js");
|
|
24
|
+
const query_1 = require("./internal/utils/query.js");
|
|
24
25
|
const index_1 = require("./_shims/index.js");
|
|
25
26
|
// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
|
|
26
27
|
(0, index_1.init)();
|
|
@@ -361,8 +362,9 @@ class APIClient {
|
|
|
361
362
|
new URL(path)
|
|
362
363
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
363
364
|
const defaultQuery = this.defaultQuery();
|
|
364
|
-
|
|
365
|
-
|
|
365
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
366
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
367
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
366
368
|
}
|
|
367
369
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
368
370
|
url.search = this.stringifyQuery(query);
|
|
@@ -370,18 +372,7 @@ class APIClient {
|
|
|
370
372
|
return url.toString();
|
|
371
373
|
}
|
|
372
374
|
stringifyQuery(query) {
|
|
373
|
-
return
|
|
374
|
-
.filter(([_, value]) => typeof value !== 'undefined')
|
|
375
|
-
.map(([key, value]) => {
|
|
376
|
-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
377
|
-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
378
|
-
}
|
|
379
|
-
if (value === null) {
|
|
380
|
-
return `${encodeURIComponent(key)}=`;
|
|
381
|
-
}
|
|
382
|
-
throw new error_1.LlamaStackClientError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
|
|
383
|
-
})
|
|
384
|
-
.join('&');
|
|
375
|
+
return (0, query_1.stringifyQuery)(query);
|
|
385
376
|
}
|
|
386
377
|
async fetchWithTimeout(url, init, ms, controller) {
|
|
387
378
|
const { signal, ...options } = init || {};
|
|
@@ -446,9 +437,9 @@ class APIClient {
|
|
|
446
437
|
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
447
438
|
}
|
|
448
439
|
}
|
|
449
|
-
// If the API asks us to wait a certain amount of time
|
|
450
|
-
//
|
|
451
|
-
if (
|
|
440
|
+
// If the API asks us to wait a certain amount of time, do what it says.
|
|
441
|
+
// Otherwise calculate a default.
|
|
442
|
+
if (timeoutMillis === undefined) {
|
|
452
443
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
453
444
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
454
445
|
}
|