Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ef0159f
chore: use Pydantic to generate OpenAPI schema
stainless-app[bot] Nov 14, 2025
d1a3652
fix(openapi): restore embedded request wrappers
stainless-app[bot] Nov 17, 2025
0ff751c
codegen metadata
stainless-app[bot] Nov 17, 2025
eaa165c
feat: Wire through parallel_tool_calls to Responses API
stainless-app[bot] Nov 18, 2025
e5041ce
fix(client): correctly specify Accept header with */* instead of empty
stainless-app[bot] Nov 19, 2025
7539880
fix: Pydantic validation error with list-type metadata in vector sear…
stainless-app[bot] Nov 19, 2025
dff3ad7
codegen metadata
stainless-app[bot] Dec 1, 2025
40e2322
feat: Add metadata field to request and response
stainless-app[bot] Dec 1, 2025
a1bf3a4
feat(api): deprecate `toolgroup` and `tool_runtime` apis
stainless-app[bot] Dec 1, 2025
79287a7
feat: Implement FastAPI router system
stainless-app[bot] Dec 3, 2025
4b368be
fix(client): fix issue with duplicate definitions in Go
stainless-app[bot] Dec 3, 2025
de0c9d9
chore(internal): codegen related update
stainless-app[bot] Dec 6, 2025
fe02071
chore: elide duplicate aliases
stainless-app[bot] Dec 6, 2025
69a2283
fix(mcp): correct code tool API endpoint
stainless-app[bot] Dec 6, 2025
185cff3
fix: rename param to avoid collision
stainless-app[bot] Dec 6, 2025
c64b27d
feat: convert Benchmarks API to use FastAPI router
stainless-app[bot] Dec 10, 2025
d10a918
feat(api): add readonly connectors API
stainless-app[bot] Dec 11, 2025
45eda95
feat: Implement include parameter specifically for adding logprobs in…
stainless-app[bot] Dec 11, 2025
97fd8b2
feat(encoder): support bracket encoding form-data object members
stainless-app[bot] Dec 12, 2025
703cd5b
codegen metadata
stainless-app[bot] Dec 14, 2025
01c0163
feat: add support for tool_choice to repsponses api
stainless-app[bot] Dec 15, 2025
d96d09c
feat: convert Datasets API to use FastAPI router
stainless-app[bot] Dec 15, 2025
76698f3
feat: migrate Providers API to FastAPI router pattern
stainless-app[bot] Dec 17, 2025
7589982
feat: migrate Inspect API to FastAPI router
stainless-app[bot] Dec 17, 2025
842d1cb
chore: add float64 to valid types for RegisterFieldValidator
stainless-app[bot] Dec 19, 2025
e1ed21b
chore(internal): codegen related update
stainless-app[bot] Dec 19, 2025
50d6580
docs: add more examples
stainless-app[bot] Dec 20, 2025
236906d
feat: introduce /admin API for stack administration and operations
stainless-app[bot] Dec 22, 2025
6955830
codegen metadata
stainless-app[bot] Dec 24, 2025
98a0a27
release: 0.4.0-alpha.2
stainless-app[bot] Dec 24, 2025
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.4.0-alpha.1"
".": "0.4.0-alpha.2"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 96
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-602ce64aa309cc15fa09388d99c9f298795686fc37605237cbc03c39d29aabf6.yml
openapi_spec_hash: fc6995247b2555e8660bc9291eb10415
config_hash: e8a35d9d37cb4774b4b0fe1b167dc156
configured_endpoints: 108
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-faa8aea30f68f4757456ffabbaa687cace33f1dc3b3eba9cb074ca4500a6fa43.yml
openapi_spec_hash: 8cea736f660e8842c3a2580469d331aa
config_hash: aa28e451064c13a38ddc44df99ebf52a
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## 0.4.0-alpha.2 (2025-12-24)

Full Changelog: [v0.4.0-alpha.1...v0.4.0-alpha.2](https://github.com/llamastack/llama-stack-client-go/compare/v0.4.0-alpha.1...v0.4.0-alpha.2)

### Features

* Add metadata field to request and response ([40e2322](https://github.com/llamastack/llama-stack-client-go/commit/40e232274eb4ce4a02927891c3d076b75f05b4ce))
* add support for tool_choice to repsponses api ([01c0163](https://github.com/llamastack/llama-stack-client-go/commit/01c01637a633a2596dba9e6097953af4ef82563a))
* **api:** add readonly connectors API ([d10a918](https://github.com/llamastack/llama-stack-client-go/commit/d10a918772ceeb8059340d7e7e0905f837f83131))
* **api:** deprecate `toolgroup` and `tool_runtime` apis ([a1bf3a4](https://github.com/llamastack/llama-stack-client-go/commit/a1bf3a4f18acf63730208b92808c1a05ef9abcfa))
* convert Benchmarks API to use FastAPI router ([c64b27d](https://github.com/llamastack/llama-stack-client-go/commit/c64b27d4c45cc0d956a3abf86fa65c209e858795))
* convert Datasets API to use FastAPI router ([d96d09c](https://github.com/llamastack/llama-stack-client-go/commit/d96d09c37bcbe974830334bb283ecd5daa2b0a2c))
* **encoder:** support bracket encoding form-data object members ([97fd8b2](https://github.com/llamastack/llama-stack-client-go/commit/97fd8b246e8a9de6952c9ddcfd31f5832d9c79bb))
* Implement FastAPI router system ([79287a7](https://github.com/llamastack/llama-stack-client-go/commit/79287a753e70992d4c2fb272b347d6d718193278))
* Implement include parameter specifically for adding logprobs in the output message ([45eda95](https://github.com/llamastack/llama-stack-client-go/commit/45eda95f3ed6b647f02037c3d08f9447e82b7bbc))
* introduce /admin API for stack administration and operations ([236906d](https://github.com/llamastack/llama-stack-client-go/commit/236906dda29ae103193096518ede546068d65286))
* migrate Inspect API to FastAPI router ([7589982](https://github.com/llamastack/llama-stack-client-go/commit/7589982a9aa7f2716e42aad6038e54b0ae30df22))
* migrate Providers API to FastAPI router pattern ([76698f3](https://github.com/llamastack/llama-stack-client-go/commit/76698f376d164a3b8c45efddd3d424f82b3aae84))
* Wire through parallel_tool_calls to Responses API ([eaa165c](https://github.com/llamastack/llama-stack-client-go/commit/eaa165c2c627190f21a30fdb54b738b0a76711f3))


### Bug Fixes

* **client:** correctly specify Accept header with */* instead of empty ([e5041ce](https://github.com/llamastack/llama-stack-client-go/commit/e5041ce562316eb7caafd32cb55269c754581d7e))
* **client:** fix issue with duplicate definitions in Go ([4b368be](https://github.com/llamastack/llama-stack-client-go/commit/4b368be02d6b4b13207b2f406eb85211ad911317))
* **mcp:** correct code tool API endpoint ([69a2283](https://github.com/llamastack/llama-stack-client-go/commit/69a22835be10196d477118fce60dedf59e2e032c))
* **openapi:** restore embedded request wrappers ([d1a3652](https://github.com/llamastack/llama-stack-client-go/commit/d1a36526f794bbcf096f9a725fd328420fff3bb4))
* Pydantic validation error with list-type metadata in vector search ([#3797](https://github.com/llamastack/llama-stack-client-go/issues/3797)) ([7539880](https://github.com/llamastack/llama-stack-client-go/commit/75398807b92fb7566e679a69a949f0859810a5c4))
* rename param to avoid collision ([185cff3](https://github.com/llamastack/llama-stack-client-go/commit/185cff3098fb3f18b0f88849236c464d356f9f80))


### Chores

* add copyright header as pre-commit hook ([#22](https://github.com/llamastack/llama-stack-client-go/issues/22)) ([6d87900](https://github.com/llamastack/llama-stack-client-go/commit/6d8790031ca42588b65c6e56f559a61b4e909852))
* add float64 to valid types for RegisterFieldValidator ([842d1cb](https://github.com/llamastack/llama-stack-client-go/commit/842d1cb00d4c62066c1cf6163642a8432a4410c7))
* elide duplicate aliases ([fe02071](https://github.com/llamastack/llama-stack-client-go/commit/fe02071f3ecded66d669bd7f365fecfe3c932273))
* **internal:** codegen related update ([e1ed21b](https://github.com/llamastack/llama-stack-client-go/commit/e1ed21b372851f7755e37b2a6fc9d3d2cd1be3b2))
* **internal:** codegen related update ([de0c9d9](https://github.com/llamastack/llama-stack-client-go/commit/de0c9d9740c1ce66108f4da34d7e781cf6bc7f4a))
* run precommit on pull request as well ([#23](https://github.com/llamastack/llama-stack-client-go/issues/23)) ([6c50f0c](https://github.com/llamastack/llama-stack-client-go/commit/6c50f0c5a6e4c091c2f91c8f42625eab1d010683))
* use Pydantic to generate OpenAPI schema ([ef0159f](https://github.com/llamastack/llama-stack-client-go/commit/ef0159fc37971d1fbcbaff773f81d2d68fe44516))


### Documentation

* add more examples ([50d6580](https://github.com/llamastack/llama-stack-client-go/commit/50d658046467e8d023f9ffbdd6080938239a551f))

## 0.4.0-alpha.1 (2025-11-14)

Full Changelog: [v0.1.0-alpha.1...v0.4.0-alpha.1](https://github.com/llamastack/llama-stack-client-go/compare/v0.1.0-alpha.1...v0.4.0-alpha.1)
Expand Down
37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/llamastack/llama-stack-client-go@v0.4.0-alpha.1'
go get -u 'github.com/llamastack/llama-stack-client-go@v0.4.0-alpha.2'
```

<!-- x-release-please-end -->
Expand All @@ -53,13 +53,11 @@ import (

func main() {
client := llamastackclient.NewClient()
response, err := client.Models.Register(context.TODO(), llamastackclient.ModelRegisterParams{
ModelID: "model_id",
})
models, err := client.Models.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Identifier)
fmt.Printf("%+v\n", models)
}

```
Expand Down Expand Up @@ -283,9 +281,34 @@ This library provides some conveniences for working with paginated list endpoint

You can use `.ListAutoPaging()` methods to iterate through items across all pages:

```go
iter := client.Responses.ListAutoPaging(context.TODO(), llamastackclient.ResponseListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
responseListResponse := iter.Current()
fmt.Printf("%+v\n", responseListResponse)
}
if err := iter.Err(); err != nil {
panic(err.Error())
}
```

Or you can use simple `.List()` methods to fetch a single page and receive a standard response object
with additional helper methods like `.GetNextPage()`, e.g.:

```go
page, err := client.Responses.List(context.TODO(), llamastackclient.ResponseListParams{})
for page != nil {
for _, response := range page.Data {
fmt.Printf("%+v\n", response)
}
page, err = page.GetNextPage()
}
if err != nil {
panic(err.Error())
}
```

### Errors

When the API returns a non-success status code, we return an error with type
Expand All @@ -302,6 +325,7 @@ _, err := client.Chat.Completions.New(context.TODO(), llamastackclient.ChatCompl
Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
OfString: llamastackclient.String("string"),
},
Role: "user",
},
}},
Model: "model",
Expand Down Expand Up @@ -338,6 +362,7 @@ client.Chat.Completions.New(
Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
OfString: llamastackclient.String("string"),
},
Role: "user",
},
}},
Model: "model",
Expand Down Expand Up @@ -404,6 +429,7 @@ client.Chat.Completions.New(
Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
OfString: llamastackclient.String("string"),
},
Role: "user",
},
}},
Model: "model",
Expand All @@ -428,6 +454,7 @@ completion, err := client.Chat.Completions.New(
Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
OfString: llamastackclient.String("string"),
},
Role: "user",
},
}},
Model: "model",
Expand Down
7 changes: 0 additions & 7 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ package llamastackclient

import (
"github.com/llamastack/llama-stack-client-go/internal/apierror"
"github.com/llamastack/llama-stack-client-go/packages/param"
)

// aliased to make [param.APIUnion] private when embedding
type paramUnion = param.APIUnion

// aliased to make [param.APIObject] private when embedding
type paramObj = param.APIObject

type Error = apierror.Error
2 changes: 2 additions & 0 deletions alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type AlphaService struct {
PostTraining AlphaPostTrainingService
Benchmarks AlphaBenchmarkService
Eval AlphaEvalService
Admin AlphaAdminService
}

// NewAlphaService generates a new service that applies the given options to each
Expand All @@ -36,5 +37,6 @@ func NewAlphaService(opts ...option.RequestOption) (r AlphaService) {
r.PostTraining = NewAlphaPostTrainingService(opts...)
r.Benchmarks = NewAlphaBenchmarkService(opts...)
r.Eval = NewAlphaEvalService(opts...)
r.Admin = NewAlphaAdminService(opts...)
return
}
166 changes: 166 additions & 0 deletions alphaadmin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
// All rights reserved.
//
// This source code is licensed under the terms described in the LICENSE file in
// the root directory of this source tree.
//
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package llamastackclient

import (
"context"
"errors"
"fmt"
"net/http"
"net/url"
"slices"

"github.com/llamastack/llama-stack-client-go/internal/apijson"
"github.com/llamastack/llama-stack-client-go/internal/apiquery"
"github.com/llamastack/llama-stack-client-go/internal/requestconfig"
"github.com/llamastack/llama-stack-client-go/option"
"github.com/llamastack/llama-stack-client-go/packages/respjson"
)

// AlphaAdminService contains methods and other services that help with interacting
// with the llama-stack-client API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewAlphaAdminService] method instead.
type AlphaAdminService struct {
Options []option.RequestOption
}

// NewAlphaAdminService generates a new service that applies the given options to
// each request. These options are applied after the parent client's options (if
// there is one), and before any request-specific options.
func NewAlphaAdminService(opts ...option.RequestOption) (r AlphaAdminService) {
r = AlphaAdminService{}
r.Options = opts
return
}

// Get the current health status of the service.
func (r *AlphaAdminService) Health(ctx context.Context, opts ...option.RequestOption) (res *HealthInfo, err error) {
opts = slices.Concat(r.Options, opts)
path := "v1alpha/admin/health"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}

// Get detailed information about a specific provider.
func (r *AlphaAdminService) InspectProvider(ctx context.Context, providerID string, opts ...option.RequestOption) (res *ProviderInfo, err error) {
opts = slices.Concat(r.Options, opts)
if providerID == "" {
err = errors.New("missing required provider_id parameter")
return
}
path := fmt.Sprintf("v1alpha/admin/providers/%s", providerID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}

// List all available providers with their configuration and health status.
func (r *AlphaAdminService) ListProviders(ctx context.Context, opts ...option.RequestOption) (res *[]ProviderInfo, err error) {
var env ListProvidersResponse
opts = slices.Concat(r.Options, opts)
path := "v1alpha/admin/providers"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
res = &env.Data
return
}

// List all available API routes with their methods and implementing providers.
func (r *AlphaAdminService) ListRoutes(ctx context.Context, query AlphaAdminListRoutesParams, opts ...option.RequestOption) (res *[]RouteInfo, err error) {
var env ListRoutesResponse
opts = slices.Concat(r.Options, opts)
path := "v1alpha/admin/inspect/routes"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
if err != nil {
return
}
res = &env.Data
return
}

// Get the version of the service.
func (r *AlphaAdminService) Version(ctx context.Context, opts ...option.RequestOption) (res *VersionInfo, err error) {
opts = slices.Concat(r.Options, opts)
path := "v1alpha/admin/version"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}

// Response containing a list of all available providers.
type ListProvidersResponse struct {

Check failure on line 100 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / test

other declaration of ListProvidersResponse

Check failure on line 100 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / test

other declaration of ListProvidersResponse

Check failure on line 100 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / lint

other declaration of ListProvidersResponse

Check failure on line 100 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / lint

other declaration of ListProvidersResponse
// List of provider information objects
Data []ProviderInfo `json:"data,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r ListProvidersResponse) RawJSON() string { return r.JSON.raw }
func (r *ListProvidersResponse) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

type AlphaAdminListRoutesParams struct {
// Filter to control which routes are returned. Can be an API level ('v1',
// 'v1alpha', 'v1beta') to show non-deprecated routes at that level, or
// 'deprecated' to show deprecated routes across all levels. If not specified,
// returns all non-deprecated routes.
//
// Any of "v1", "v1alpha", "v1beta", "deprecated".
APIFilter AlphaAdminListRoutesParamsAPIFilter `query:"api_filter,omitzero" json:"-"`
paramObj
}

// URLQuery serializes [AlphaAdminListRoutesParams]'s query parameters as
// `url.Values`.
func (r AlphaAdminListRoutesParams) URLQuery() (v url.Values, err error) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatComma,
NestedFormat: apiquery.NestedQueryFormatBrackets,
})
}

// Filter to control which routes are returned. Can be an API level ('v1',
// 'v1alpha', 'v1beta') to show non-deprecated routes at that level, or
// 'deprecated' to show deprecated routes across all levels. If not specified,
// returns all non-deprecated routes.
type AlphaAdminListRoutesParamsAPIFilter string

const (
AlphaAdminListRoutesParamsAPIFilterV1 AlphaAdminListRoutesParamsAPIFilter = "v1"
AlphaAdminListRoutesParamsAPIFilterV1alpha AlphaAdminListRoutesParamsAPIFilter = "v1alpha"
AlphaAdminListRoutesParamsAPIFilterV1beta AlphaAdminListRoutesParamsAPIFilter = "v1beta"
AlphaAdminListRoutesParamsAPIFilterDeprecated AlphaAdminListRoutesParamsAPIFilter = "deprecated"
)

// Response containing a list of all available API routes.
type ListRoutesResponse struct {

Check failure on line 151 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / test

other declaration of ListRoutesResponse

Check failure on line 151 in alphaadmin.go

View workflow job for this annotation

GitHub Actions / lint

other declaration of ListRoutesResponse
// List of available API routes
Data []RouteInfo `json:"data,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r ListRoutesResponse) RawJSON() string { return r.JSON.raw }
func (r *ListRoutesResponse) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
Loading