Skip to content

Commit 5997612

Browse files
release: 0.12.0 (#566)
* chore(internal): update pydantic dependency * chore(types): change optional parameter type from NotGiven to Omit * chore: do not install brew dependencies in ./scripts/bootstrap by default * chore(internal): version bump * chore(internal): version bump * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * chore(internal): detect missing future annotations with ruff * chore: bump `httpx-aiohttp` version to 0.1.9 * feat(api): api update * feat(api): api update * fix(client): close streams without requiring full consumption * chore(internal/tests): avoid race condition with implicit client cleanup * chore(internal): grammar fix (it's -> its) * chore(package): drop Python 3.8 support * fix: compat with Python 3.14 * release: 0.12.0 * chore(internal): update pydantic dependency * chore(types): change optional parameter type from NotGiven to Omit * chore: do not install brew dependencies in ./scripts/bootstrap by default * chore(internal): version bump * chore(internal): version bump * codegen metadata * codegen metadata * codegen metadata * codegen metadata * codegen metadata * chore(internal): detect missing future annotations with ruff * chore: bump `httpx-aiohttp` version to 0.1.9 * feat(api): api update * feat(api): api update * fix(client): close streams without requiring full consumption * chore(internal/tests): avoid race condition with implicit client cleanup * chore(internal): grammar fix (it's -> its) * chore(package): drop Python 3.8 support * fix: compat with Python 3.14 * chore(internal): version bump * chore(internal): version bump * chore(internal): version bump * chore(internal): version bump * chore(internal): version bump * chore(internal): version bump * release: 0.12.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Vinicius Mello <vinicius@openlayer.com>
1 parent a1619e7 commit 5997612

Some content is hidden

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

45 files changed

+1613
-425
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.11.4"
2+
".": "0.12.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 18
2-
openapi_spec_hash: 153617b7252b1b12f21043b2a1246f8b
3-
config_hash: 30422a4611d93ca69e4f1aff60b9ddb5
2+
openapi_spec_hash: 539798fac79a1eeebf9ac4faa0492455
3+
config_hash: 6dcf08c4324405f152d1da9fc11ab04a

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## 0.12.0 (2025-12-26)
9+
10+
Full Changelog: [v0.11.4...v0.12.0](https://github.com/openlayer-ai/openlayer-python/compare/v0.11.4...v0.12.0)
11+
12+
### Features
13+
14+
* **api:** api update ([f117723](https://github.com/openlayer-ai/openlayer-python/commit/f11772338f2da872ca49f0a658c45109b9507800))
15+
* **api:** api update ([9f22b46](https://github.com/openlayer-ai/openlayer-python/commit/9f22b4660e4b37a786a6ff3999847936577c8a23))
16+
* enhance LiteLLM metadata extraction by adding cost retrieval from response headers ([43a7d2e](https://github.com/openlayer-ai/openlayer-python/commit/43a7d2e44b788586a3e4e3e484e9a7967f3631af))
17+
* prevent multiple patching in trace_litellm function to avoid duplicate traces ([#568](https://github.com/openlayer-ai/openlayer-python/issues/568)) ([a1619e7](https://github.com/openlayer-ai/openlayer-python/commit/a1619e793878720b5719ca7e2a580e9990b88f96))
18+
19+
20+
### Bug Fixes
21+
22+
* **client:** close streams without requiring full consumption ([c1458b7](https://github.com/openlayer-ai/openlayer-python/commit/c1458b7487946db5d4a2037852ee0acd31cc5672))
23+
* compat with Python 3.14 ([c2d9681](https://github.com/openlayer-ai/openlayer-python/commit/c2d9681e556118e9f6f91de46f1662b7a794ee2c))
24+
25+
26+
### Chores
27+
28+
* bump `httpx-aiohttp` version to 0.1.9 ([3f895de](https://github.com/openlayer-ai/openlayer-python/commit/3f895ded9e56ca11c4aafc093502726a14afedf6))
29+
* do not install brew dependencies in ./scripts/bootstrap by default ([45badc5](https://github.com/openlayer-ai/openlayer-python/commit/45badc57d4e30a195407e5b733a7327356685c69))
30+
* **internal/tests:** avoid race condition with implicit client cleanup ([3d05ccc](https://github.com/openlayer-ai/openlayer-python/commit/3d05ccc4ee73fe8f5c3de50d4a7dcbdcb3551674))
31+
* **internal:** detect missing future annotations with ruff ([d2887ba](https://github.com/openlayer-ai/openlayer-python/commit/d2887ba77f441518ca7e8ae1b690cee42794596a))
32+
* **internal:** grammar fix (it's -&gt; its) ([4af20e1](https://github.com/openlayer-ai/openlayer-python/commit/4af20e1d560be01fb7eaa9dd050398fe23f1e4bb))
33+
* **internal:** update pydantic dependency ([0af11ac](https://github.com/openlayer-ai/openlayer-python/commit/0af11ac1a28176380247bf3e3b5db00fe6349593))
34+
* **internal:** version bump ([55f6ab0](https://github.com/openlayer-ai/openlayer-python/commit/55f6ab040221d31a154ef21c71a1957b77043f79))
35+
* **internal:** version bump ([3a5c286](https://github.com/openlayer-ai/openlayer-python/commit/3a5c2869c16c0f00e871042af29da29063a70c07))
36+
* **internal:** version bump ([d5dc8c0](https://github.com/openlayer-ai/openlayer-python/commit/d5dc8c0fd5b792e4a81f6445df0091f1cf9f8e36))
37+
* **internal:** version bump ([61324d6](https://github.com/openlayer-ai/openlayer-python/commit/61324d655921bbe613cd2542feba4a758d591293))
38+
* **internal:** version bump ([9db5997](https://github.com/openlayer-ai/openlayer-python/commit/9db5997e6d7648e00c37277ea87b2d5f7e79aa4f))
39+
* **internal:** version bump ([4659537](https://github.com/openlayer-ai/openlayer-python/commit/465953753d902fd2345cac72e0ed87131668b0f4))
40+
* **internal:** version bump ([199356c](https://github.com/openlayer-ai/openlayer-python/commit/199356ca1ce8eae57a6557c17d8c173486132fc2))
41+
* **internal:** version bump ([e63dee5](https://github.com/openlayer-ai/openlayer-python/commit/e63dee5ac27bfc396ec709188a54c3045e1e3698))
42+
* **package:** drop Python 3.8 support ([4c48617](https://github.com/openlayer-ai/openlayer-python/commit/4c48617ef7c34e0db601617a3b30d3bb540eeea5))
43+
* **types:** change optional parameter type from NotGiven to Omit ([54c1533](https://github.com/openlayer-ai/openlayer-python/commit/54c1533b6810fcf9323c23f39dc008405fd0a36e))
44+
845
## 0.11.4 (2025-12-17)
946

1047
Full Changelog: [v0.11.3...v0.11.4](https://github.com/openlayer-ai/openlayer-python/compare/v0.11.3...v0.11.4)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- prettier-ignore -->
44
[![PyPI version](https://img.shields.io/pypi/v/openlayer.svg?label=pypi%20(stable))](https://pypi.org/project/openlayer/)
55

6-
The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.8+
6+
The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.9+
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
99

@@ -515,7 +515,7 @@ print(openlayer.__version__)
515515

516516
## Requirements
517517

518-
Python 3.8 or higher.
518+
Python 3.9 or higher.
519519

520520
## Contributing
521521

examples/tracing/openai/openai_agents_tracing.ipynb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@
177177
"metadata": {},
178178
"outputs": [],
179179
"source": [
180+
"from __future__ import annotations\n",
181+
"\n",
182+
"\n",
180183
"class AirlineAgentContext(BaseModel):\n",
181184
" \"\"\"Context model to maintain conversation state across agents.\"\"\"\n",
182185
" passenger_name: str | None = None\n",

examples/tracing/openai/openai_tracing.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
"metadata": {},
122122
"outputs": [],
123123
"source": [
124+
"from __future__ import annotations\n",
125+
"\n",
124126
"from pydantic import BaseModel\n",
125127
"\n",
126128
"\n",

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openlayer"
3-
version = "0.11.4"
3+
version = "0.12.0"
44
description = "The official Python library for the openlayer API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -22,11 +22,10 @@ dependencies = [
2222
"tqdm",
2323
"wrapt>=1.14.0"
2424
]
25-
requires-python = ">= 3.8"
25+
requires-python = ">= 3.9"
2626
classifiers = [
2727
"Typing :: Typed",
2828
"Intended Audience :: Developers",
29-
"Programming Language :: Python :: 3.8",
3029
"Programming Language :: Python :: 3.9",
3130
"Programming Language :: Python :: 3.10",
3231
"Programming Language :: Python :: 3.11",
@@ -46,7 +45,7 @@ Homepage = "https://github.com/openlayer-ai/openlayer-python"
4645
Repository = "https://github.com/openlayer-ai/openlayer-python"
4746

4847
[project.optional-dependencies]
49-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
48+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
5049

5150
[tool.rye]
5251
managed = true
@@ -148,7 +147,7 @@ filterwarnings = [
148147
# there are a couple of flags that are still disabled by
149148
# default in strict mode as they are experimental and niche.
150149
typeCheckingMode = "strict"
151-
pythonVersion = "3.8"
150+
pythonVersion = "3.9"
152151

153152
exclude = [
154153
"_dev",
@@ -233,6 +232,8 @@ select = [
233232
"B",
234233
# remove unused imports
235234
"F401",
235+
# check for missing future annotations
236+
"FA102",
236237
# bare except statements
237238
"E722",
238239
# unused arguments
@@ -255,6 +256,8 @@ unfixable = [
255256
"T203",
256257
]
257258

259+
extend-safe-fixes = ["FA102"]
260+
258261
[tool.ruff.lint.flake8-tidy-imports.banned-api]
259262
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
260263

requirements-dev.lock

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ httpx==0.28.1
5757
# via httpx-aiohttp
5858
# via openlayer
5959
# via respx
60-
httpx-aiohttp==0.1.8
60+
httpx-aiohttp==0.1.9
6161
# via openlayer
6262
idna==3.4
6363
# via anyio
@@ -96,11 +96,9 @@ pluggy==1.5.0
9696
propcache==0.3.2
9797
# via aiohttp
9898
# via yarl
99-
pyarrow==15.0.2
99+
pydantic==2.11.9
100100
# via openlayer
101-
pydantic==2.10.3
102-
# via openlayer
103-
pydantic-core==2.27.1
101+
pydantic-core==2.33.2
104102
# via pydantic
105103
pygments==2.18.0
106104
# via rich
@@ -146,6 +144,9 @@ typing-extensions==4.12.2
146144
# via pydantic
147145
# via pydantic-core
148146
# via pyright
147+
# via typing-inspection
148+
typing-inspection==0.4.1
149+
# via pydantic
149150
tzdata==2024.1
150151
# via pandas
151152
urllib3==2.2.3

requirements.lock

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ httpcore==1.0.9
4444
httpx==0.28.1
4545
# via httpx-aiohttp
4646
# via openlayer
47-
httpx-aiohttp==0.1.8
47+
httpx-aiohttp==0.1.9
4848
# via openlayer
4949
idna==3.4
5050
# via anyio
@@ -63,11 +63,9 @@ pandas==2.2.2
6363
propcache==0.3.2
6464
# via aiohttp
6565
# via yarl
66-
pyarrow==15.0.2
66+
pydantic==2.11.9
6767
# via openlayer
68-
pydantic==2.10.3
69-
# via openlayer
70-
pydantic-core==2.27.1
68+
pydantic-core==2.33.2
7169
# via pydantic
7270
python-dateutil==2.9.0.post0
7371
# via pandas
@@ -92,6 +90,10 @@ typing-extensions==4.12.2
9290
# via openlayer
9391
# via pydantic
9492
# via pydantic-core
93+
# via typing-inspection
94+
typing-inspection==0.4.1
95+
# via pydantic
96+
yarl==1.20.0
9597
tzdata==2024.1
9698
# via pandas
9799
urllib3==2.2.3

scripts/bootstrap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
9-
echo "==> Installing Homebrew dependencies…"
10-
brew bundle
9+
echo -n "==> Install Homebrew dependencies? (y/N): "
10+
read -r response
11+
case "$response" in
12+
[yY][eE][sS]|[yY])
13+
brew bundle
14+
;;
15+
*)
16+
;;
17+
esac
18+
echo
1119
}
1220
fi
1321

0 commit comments

Comments
 (0)