Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.17"
".": "0.3.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-f59f1c7d33001d60b5190f68aa49eacec90f05dbe694620b8916152c3922051d.yml
openapi_spec_hash: 804edd2e834493906dc430145402be3b
config_hash: de16e52db65de71ac35adcdb665a74f5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1c5bc84a8d003bb986b2cc2a7bb6a5232ab0514469a7f67ddbf58c06de248a03.yml
openapi_spec_hash: ad377dd848973abb656ca35f5fdc93df
config_hash: e67fd054e95c1e82f78f4b834e96bb65
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.3.0 (2025-08-13)

Full Changelog: [v0.2.17...v0.3.0](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.2.17...v0.3.0)

### Features

* **api:** update via SDK Studio ([f35b8f2](https://github.com/llamastack/llama-stack-client-typescript/commit/f35b8f26d1a3783b1768f0fdae7ded0c64123d5d))
* **api:** update via SDK Studio ([7cf0786](https://github.com/llamastack/llama-stack-client-typescript/commit/7cf0786e73360062d59f0c329383cc419bb14c3b))
* **api:** update via SDK Studio ([add2c59](https://github.com/llamastack/llama-stack-client-typescript/commit/add2c593baa8bb791cafbb129d5e0b5669aa6e98))
* **api:** update via SDK Studio ([e402b8d](https://github.com/llamastack/llama-stack-client-typescript/commit/e402b8ddccbea7197c186b7ceab2c346045962c1))
* **api:** update via SDK Studio ([2185339](https://github.com/llamastack/llama-stack-client-typescript/commit/21853392ad1c0a9c829405eeb0ece6504dd1be70))
* **api:** update via SDK Studio ([4a43a8f](https://github.com/llamastack/llama-stack-client-typescript/commit/4a43a8ff19d7e1ea175ed528dc562e6308ced95f))
* **api:** update via SDK Studio ([fa60dbf](https://github.com/llamastack/llama-stack-client-typescript/commit/fa60dbfdc63e9ed638946efca0d4d02954909df9))
* **api:** update via SDK Studio ([afda79e](https://github.com/llamastack/llama-stack-client-typescript/commit/afda79e99224af2f2c78d9190d21d46ebc59dc94))


### Chores

* **internal:** move publish config ([e8eff1a](https://github.com/llamastack/llama-stack-client-typescript/commit/e8eff1a0c8853dff423d10f9701b26c24b8e904b))
* **internal:** update comment in script ([4fff100](https://github.com/llamastack/llama-stack-client-typescript/commit/4fff100b23c168e986583d4b1a98303dbf0eba95))
* update @stainless-api/prism-cli to v5.15.0 ([12e10b3](https://github.com/llamastack/llama-stack-client-typescript/commit/12e10b3610a405534328d835dc30d9b522cb1d31))

## 0.2.17 (2025-08-06)

Full Changelog: [v0.2.15...v0.2.17](https://github.com/llamastack/llama-stack-client-typescript/compare/v0.2.15...v0.2.17)
Expand Down
11 changes: 5 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Methods:

- <code title="post /v1/openai/v1/responses">client.responses.<a href="./src/resources/responses/responses.ts">create</a>({ ...params }) -> ResponseObject</code>
- <code title="get /v1/openai/v1/responses/{response_id}">client.responses.<a href="./src/resources/responses/responses.ts">retrieve</a>(responseId) -> ResponseObject</code>
- <code title="get /v1/openai/v1/responses">client.responses.<a href="./src/resources/responses/responses.ts">list</a>({ ...params }) -> ResponseListResponse</code>
- <code title="get /v1/openai/v1/responses">client.responses.<a href="./src/resources/responses/responses.ts">list</a>({ ...params }) -> ResponseListResponsesOpenAICursorPage</code>

## InputItems

Expand Down Expand Up @@ -262,7 +262,7 @@ Methods:

- <code title="post /v1/openai/v1/chat/completions">client.chat.completions.<a href="./src/resources/chat/completions.ts">create</a>({ ...params }) -> CompletionCreateResponse</code>
- <code title="get /v1/openai/v1/chat/completions/{completion_id}">client.chat.completions.<a href="./src/resources/chat/completions.ts">retrieve</a>(completionId) -> CompletionRetrieveResponse</code>
- <code title="get /v1/openai/v1/chat/completions">client.chat.completions.<a href="./src/resources/chat/completions.ts">list</a>({ ...params }) -> CompletionListResponse</code>
- <code title="get /v1/openai/v1/chat/completions">client.chat.completions.<a href="./src/resources/chat/completions.ts">list</a>({ ...params }) -> CompletionListResponsesOpenAICursorPage</code>

# Completions

Expand Down Expand Up @@ -315,7 +315,7 @@ Methods:
- <code title="post /v1/openai/v1/vector_stores">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">create</a>({ ...params }) -> VectorStore</code>
- <code title="get /v1/openai/v1/vector_stores/{vector_store_id}">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">retrieve</a>(vectorStoreId) -> VectorStore</code>
- <code title="post /v1/openai/v1/vector_stores/{vector_store_id}">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">update</a>(vectorStoreId, { ...params }) -> VectorStore</code>
- <code title="get /v1/openai/v1/vector_stores">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">list</a>({ ...params }) -> ListVectorStoresResponse</code>
- <code title="get /v1/openai/v1/vector_stores">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">list</a>({ ...params }) -> VectorStoresOpenAICursorPage</code>
- <code title="delete /v1/openai/v1/vector_stores/{vector_store_id}">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">delete</a>(vectorStoreId) -> VectorStoreDeleteResponse</code>
- <code title="post /v1/openai/v1/vector_stores/{vector_store_id}/search">client.vectorStores.<a href="./src/resources/vector-stores/vector-stores.ts">search</a>(vectorStoreId, { ...params }) -> VectorStoreSearchResponse</code>

Expand All @@ -324,7 +324,6 @@ Methods:
Types:

- <code><a href="./src/resources/vector-stores/files.ts">VectorStoreFile</a></code>
- <code><a href="./src/resources/vector-stores/files.ts">FileListResponse</a></code>
- <code><a href="./src/resources/vector-stores/files.ts">FileDeleteResponse</a></code>
- <code><a href="./src/resources/vector-stores/files.ts">FileContentResponse</a></code>

Expand All @@ -333,7 +332,7 @@ Methods:
- <code title="post /v1/openai/v1/vector_stores/{vector_store_id}/files">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">create</a>(vectorStoreId, { ...params }) -> VectorStoreFile</code>
- <code title="get /v1/openai/v1/vector_stores/{vector_store_id}/files/{file_id}">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">retrieve</a>(vectorStoreId, fileId) -> VectorStoreFile</code>
- <code title="post /v1/openai/v1/vector_stores/{vector_store_id}/files/{file_id}">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">update</a>(vectorStoreId, fileId, { ...params }) -> VectorStoreFile</code>
- <code title="get /v1/openai/v1/vector_stores/{vector_store_id}/files">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">list</a>(vectorStoreId, { ...params }) -> FileListResponse</code>
- <code title="get /v1/openai/v1/vector_stores/{vector_store_id}/files">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">list</a>(vectorStoreId, { ...params }) -> VectorStoreFilesOpenAICursorPage</code>
- <code title="delete /v1/openai/v1/vector_stores/{vector_store_id}/files/{file_id}">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">delete</a>(vectorStoreId, fileId) -> FileDeleteResponse</code>
- <code title="get /v1/openai/v1/vector_stores/{vector_store_id}/files/{file_id}/content">client.vectorStores.files.<a href="./src/resources/vector-stores/files.ts">content</a>(vectorStoreId, fileId) -> FileContentResponse</code>

Expand Down Expand Up @@ -525,6 +524,6 @@ Methods:

- <code title="post /v1/openai/v1/files">client.files.<a href="./src/resources/files.ts">create</a>({ ...params }) -> File</code>
- <code title="get /v1/openai/v1/files/{file_id}">client.files.<a href="./src/resources/files.ts">retrieve</a>(fileId) -> File</code>
- <code title="get /v1/openai/v1/files">client.files.<a href="./src/resources/files.ts">list</a>({ ...params }) -> ListFilesResponse</code>
- <code title="get /v1/openai/v1/files">client.files.<a href="./src/resources/files.ts">list</a>({ ...params }) -> FilesOpenAICursorPage</code>
- <code title="delete /v1/openai/v1/files/{file_id}">client.files.<a href="./src/resources/files.ts">delete</a>(fileId) -> DeleteFileResponse</code>
- <code title="get /v1/openai/v1/files/{file_id}/content">client.files.<a href="./src/resources/files.ts">content</a>(fileId) -> unknown</code>
2 changes: 1 addition & 1 deletion bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ else
fi

# Publish with the appropriate tag
yarn publish --access public --tag "$TAG"
yarn publish --tag "$TAG"
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "llama-stack-client",
"version": "0.2.17",
"version": "0.3.0",
"description": "The official TypeScript library for the Llama Stack Client API",
"author": "Llama Stack Client <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -13,6 +13,9 @@
"**/*"
],
"private": false,
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "./scripts/test",
"build": "./scripts/build",
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
Expand Down
22 changes: 21 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import * as qs from './internal/qs';
import * as Core from './core';
import * as Errors from './error';
import * as Pagination from './pagination';
import { type DatasetsIterrowsParams, DatasetsIterrowsResponse } from './pagination';
import {
type DatasetsIterrowsParams,
DatasetsIterrowsResponse,
type OpenAICursorPageParams,
OpenAICursorPageResponse,
} from './pagination';
import * as Uploads from './uploads';
import * as API from './resources/index';
import {
Expand Down Expand Up @@ -41,6 +46,7 @@ import {
FileCreateParams,
FileListParams,
Files,
FilesOpenAICursorPage,
ListFilesResponse,
} from './resources/files';
import {
Expand Down Expand Up @@ -177,6 +183,7 @@ import {
ResponseCreateParamsStreaming,
ResponseListParams,
ResponseListResponse,
ResponseListResponsesOpenAICursorPage,
ResponseObject,
ResponseObjectStream,
Responses,
Expand All @@ -199,6 +206,7 @@ import {
VectorStoreSearchResponse,
VectorStoreUpdateParams,
VectorStores,
VectorStoresOpenAICursorPage,
} from './resources/vector-stores/vector-stores';

export interface ClientOptions {
Expand Down Expand Up @@ -394,6 +402,7 @@ LlamaStackClient.Toolgroups = Toolgroups;
LlamaStackClient.Tools = Tools;
LlamaStackClient.ToolRuntime = ToolRuntime;
LlamaStackClient.Responses = Responses;
LlamaStackClient.ResponseListResponsesOpenAICursorPage = ResponseListResponsesOpenAICursorPage;
LlamaStackClient.Agents = Agents;
LlamaStackClient.Datasets = Datasets;
LlamaStackClient.Eval = Eval;
Expand All @@ -405,6 +414,7 @@ LlamaStackClient.Completions = Completions;
LlamaStackClient.VectorIo = VectorIo;
LlamaStackClient.VectorDBs = VectorDBs;
LlamaStackClient.VectorStores = VectorStores;
LlamaStackClient.VectorStoresOpenAICursorPage = VectorStoresOpenAICursorPage;
LlamaStackClient.Models = Models;
LlamaStackClient.PostTraining = PostTraining;
LlamaStackClient.Providers = Providers;
Expand All @@ -418,6 +428,7 @@ LlamaStackClient.Scoring = Scoring;
LlamaStackClient.ScoringFunctions = ScoringFunctions;
LlamaStackClient.Benchmarks = Benchmarks;
LlamaStackClient.Files = Files;
LlamaStackClient.FilesOpenAICursorPage = FilesOpenAICursorPage;
export declare namespace LlamaStackClient {
export type RequestOptions = Core.RequestOptions;

Expand All @@ -427,6 +438,12 @@ export declare namespace LlamaStackClient {
type DatasetsIterrowsResponse as DatasetsIterrowsResponse,
};

export import OpenAICursorPage = Pagination.OpenAICursorPage;
export {
type OpenAICursorPageParams as OpenAICursorPageParams,
type OpenAICursorPageResponse as OpenAICursorPageResponse,
};

export {
Toolgroups as Toolgroups,
type ListToolGroupsResponse as ListToolGroupsResponse,
Expand Down Expand Up @@ -457,6 +474,7 @@ export declare namespace LlamaStackClient {
type ResponseObject as ResponseObject,
type ResponseObjectStream as ResponseObjectStream,
type ResponseListResponse as ResponseListResponse,
ResponseListResponsesOpenAICursorPage as ResponseListResponsesOpenAICursorPage,
type ResponseCreateParams as ResponseCreateParams,
type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming,
type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming,
Expand Down Expand Up @@ -565,6 +583,7 @@ export declare namespace LlamaStackClient {
type VectorStore as VectorStore,
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
type VectorStoreSearchResponse as VectorStoreSearchResponse,
VectorStoresOpenAICursorPage as VectorStoresOpenAICursorPage,
type VectorStoreCreateParams as VectorStoreCreateParams,
type VectorStoreUpdateParams as VectorStoreUpdateParams,
type VectorStoreListParams as VectorStoreListParams,
Expand Down Expand Up @@ -675,6 +694,7 @@ export declare namespace LlamaStackClient {
type File as File,
type ListFilesResponse as ListFilesResponse,
type FileContentResponse as FileContentResponse,
FilesOpenAICursorPage as FilesOpenAICursorPage,
type FileCreateParams as FileCreateParams,
type FileListParams as FileListParams,
};
Expand Down
70 changes: 70 additions & 0 deletions src/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,73 @@ export class DatasetsIterrows<Item> extends AbstractPage<Item> implements Datase
};
}
}

export interface OpenAICursorPageResponse<Item> {
data: Array<Item>;

has_more: boolean;

last_id: string;
}

export interface OpenAICursorPageParams {
limit?: number;

after?: string;
}

export class OpenAICursorPage<Item> extends AbstractPage<Item> implements OpenAICursorPageResponse<Item> {
data: Array<Item>;

has_more: boolean;

last_id: string;

constructor(
client: APIClient,
response: Response,
body: OpenAICursorPageResponse<Item>,
options: FinalRequestOptions,
) {
super(client, response, body, options);

this.data = body.data || [];
this.has_more = body.has_more || false;
this.last_id = body.last_id || '';
}

getPaginatedItems(): Item[] {
return this.data ?? [];
}

override hasNextPage(): boolean {
if (this.has_more === false) {
return false;
}

return super.hasNextPage();
}

// @deprecated Please use `nextPageInfo()` instead
nextPageParams(): Partial<OpenAICursorPageParams> | null {
const info = this.nextPageInfo();
if (!info) return null;
if ('params' in info) return info.params;
const params = Object.fromEntries(info.url.searchParams);
if (!Object.keys(params).length) return null;
return params;
}

nextPageInfo(): PageInfo | null {
const cursor = this.last_id;
if (!cursor) {
return null;
}

return {
params: {
after: cursor,
},
};
}
}
3 changes: 3 additions & 0 deletions src/resources/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CompletionCreateResponse,
CompletionListParams,
CompletionListResponse,
CompletionListResponsesOpenAICursorPage,
CompletionRetrieveResponse,
Completions,
} from './completions';
Expand Down Expand Up @@ -219,6 +220,7 @@ export namespace ChatCompletionChunk {
}

Chat.Completions = Completions;
Chat.CompletionListResponsesOpenAICursorPage = CompletionListResponsesOpenAICursorPage;

export declare namespace Chat {
export { type ChatCompletionChunk as ChatCompletionChunk };
Expand All @@ -228,6 +230,7 @@ export declare namespace Chat {
type CompletionCreateResponse as CompletionCreateResponse,
type CompletionRetrieveResponse as CompletionRetrieveResponse,
type CompletionListResponse as CompletionListResponse,
CompletionListResponsesOpenAICursorPage as CompletionListResponsesOpenAICursorPage,
type CompletionCreateParams as CompletionCreateParams,
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
Expand Down
Loading