Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
run: |
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.LLAMA_STACK_PYPI_TOKEN || secrets.PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.LLAMA_STACK_CLIENT_PYPI_TOKEN || secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
PYPI_TOKEN: ${{ secrets.LLAMA_STACK_PYPI_TOKEN || secrets.PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.LLAMA_STACK_CLIENT_PYPI_TOKEN || secrets.PYPI_TOKEN }}
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.1.0-alpha.2"
".": "0.1.0-alpha.3"
}
2 changes: 1 addition & 1 deletion .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-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
config_hash: c2377844063fe8b7c43d8b79522fa6fc
config_hash: 3e9fdf542184399384ed713426a8065c
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.0-alpha.3 (2025-06-27)

Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/llamastack/llama-stack-client-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

### Features

* **api:** update via SDK Studio ([e87f225](https://github.com/llamastack/llama-stack-client-python/commit/e87f2257b00a287dd34dc95f4d39661728075891))
* make custom code changes ([#3](https://github.com/llamastack/llama-stack-client-python/issues/3)) ([83fa371](https://github.com/llamastack/llama-stack-client-python/commit/83fa37124133aab73bf2bbbdcd39338b9a192475))

## 0.1.0-alpha.2 (2025-06-27)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/llamastack/llama-stack-client-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ print(model.identifier)

While you can provide an `api_key` keyword argument,
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
to add `LLAMA_STACK_API_KEY="My API Key"` to your `.env` file
to add `LLAMA_STACK_CLIENT_API_KEY="My API Key"` to your `.env` file
so that your API Key is not stored in source control.

## Async usage
Expand Down Expand Up @@ -309,10 +309,10 @@ Note that requests that time out are [retried twice by default](#retries).

We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

You can enable logging by setting the environment variable `LLAMA_STACK_LOG` to `info`.
You can enable logging by setting the environment variable `LLAMA_STACK_CLIENT_LOG` to `info`.

```shell
$ export LLAMA_STACK_LOG=info
$ export LLAMA_STACK_CLIENT_LOG=info
```

Or to `debug` for more verbose logging.
Expand Down Expand Up @@ -425,7 +425,7 @@ import httpx
from llama_stack_client import LlamaStackClient, DefaultHttpxClient

client = LlamaStackClient(
# Or use the `LLAMA_STACK_BASE_URL` env var
# Or use the `LLAMA_STACK_CLIENT_BASE_URL` env var
base_url="http://my.test.server.example.com:8083",
http_client=DefaultHttpxClient(
proxy="http://my.test.proxy.example.com",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "llama_stack_client"
version = "0.1.0-alpha.2"
version = "0.1.0-alpha.3"
description = "The official Python library for the llama-stack-client API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
12 changes: 6 additions & 6 deletions src/llama_stack_client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ def __init__(
) -> None:
"""Construct a new synchronous LlamaStackClient client instance.

This automatically infers the `api_key` argument from the `LLAMA_STACK_API_KEY` environment variable if it is not provided.
This automatically infers the `api_key` argument from the `LLAMA_STACK_CLIENT_API_KEY` environment variable if it is not provided.
"""
if api_key is None:
api_key = os.environ.get("LLAMA_STACK_API_KEY")
api_key = os.environ.get("LLAMA_STACK_CLIENT_API_KEY")
self.api_key = api_key

if base_url is None:
base_url = os.environ.get("LLAMA_STACK_BASE_URL")
base_url = os.environ.get("LLAMA_STACK_CLIENT_BASE_URL")
if base_url is None:
base_url = f"http://any-hosted-llama-stack.com"

Expand Down Expand Up @@ -355,14 +355,14 @@ def __init__(
) -> None:
"""Construct a new async AsyncLlamaStackClient client instance.

This automatically infers the `api_key` argument from the `LLAMA_STACK_API_KEY` environment variable if it is not provided.
This automatically infers the `api_key` argument from the `LLAMA_STACK_CLIENT_API_KEY` environment variable if it is not provided.
"""
if api_key is None:
api_key = os.environ.get("LLAMA_STACK_API_KEY")
api_key = os.environ.get("LLAMA_STACK_CLIENT_API_KEY")
self.api_key = api_key

if base_url is None:
base_url = os.environ.get("LLAMA_STACK_BASE_URL")
base_url = os.environ.get("LLAMA_STACK_CLIENT_BASE_URL")
if base_url is None:
base_url = f"http://any-hosted-llama-stack.com"

Expand Down
2 changes: 1 addition & 1 deletion src/llama_stack_client/_utils/_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _basic_config() -> None:


def setup_logging() -> None:
env = os.environ.get("LLAMA_STACK_LOG")
env = os.environ.get("LLAMA_STACK_CLIENT_LOG")
if env == "debug":
_basic_config()
logger.setLevel(logging.DEBUG)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def test_base_url_setter(self) -> None:
assert client.base_url == "https://example.com/from_setter/"

def test_base_url_env(self) -> None:
with update_env(LLAMA_STACK_BASE_URL="http://localhost:5000/from/env"):
with update_env(LLAMA_STACK_CLIENT_BASE_URL="http://localhost:5000/from/env"):
client = LlamaStackClient(_strict_response_validation=True)
assert client.base_url == "http://localhost:5000/from/env/"

Expand Down Expand Up @@ -1337,7 +1337,7 @@ def test_base_url_setter(self) -> None:
assert client.base_url == "https://example.com/from_setter/"

def test_base_url_env(self) -> None:
with update_env(LLAMA_STACK_BASE_URL="http://localhost:5000/from/env"):
with update_env(LLAMA_STACK_CLIENT_BASE_URL="http://localhost:5000/from/env"):
client = AsyncLlamaStackClient(_strict_response_validation=True)
assert client.base_url == "http://localhost:5000/from/env/"

Expand Down
Loading