Skip to content
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
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'

- name: Install dependencies
run: uv sync --all-extras
Expand All @@ -45,8 +43,6 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'

- name: Install dependencies
run: uv sync --all-extras
Expand Down Expand Up @@ -79,8 +75,6 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -99,8 +93,6 @@ jobs:

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.8.11'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.0.0-alpha.4"
".": "2.0.0-alpha.5"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 44
configured_endpoints: 43
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-e9e60279414ac3279c025d6318b5f67a8f6d01170e365612e791f3a1f259b94f.yml
openapi_spec_hash: 26c59292808c5ae9f222f95f056430cf
config_hash: 9bdb3abc3260073f1c3dd0c52a352918
config_hash: 23c87c234dd773a896773436c7eb2a28
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 2.0.0-alpha.5 (2025-11-25)

Full Changelog: [v2.0.0-alpha.4...v2.0.0-alpha.5](https://github.com/togethercomputer/together-py/compare/v2.0.0-alpha.4...v2.0.0-alpha.5)

### Features

* **api:** manual updates ([f1b27a5](https://github.com/togethercomputer/together-py/commit/f1b27a53efeb925b6b89d3f7636c4809814347d8))


### Bug Fixes

* uv v0.8.11 only has python 3.14rc, which causes issues with pydantic 2 ([981828a](https://github.com/togethercomputer/together-py/commit/981828a2f70db44845e6a1ae93d1906269d7ba5f))


### Chores

* **internal:** working around mypy ([7d080fc](https://github.com/togethercomputer/together-py/commit/7d080fc748da2cf3293ddfa5b74b23e47213c77f))

## 2.0.0-alpha.4 (2025-11-24)

Full Changelog: [v2.0.0-alpha.3...v2.0.0-alpha.4](https://github.com/togethercomputer/together-py/compare/v2.0.0-alpha.3...v2.0.0-alpha.4)
Expand Down
9 changes: 1 addition & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,12 @@ Methods:
Types:

```python
from together.types import (
EvaluationJob,
EvalCreateResponse,
EvalUpdateResponse,
EvalListResponse,
EvalStatusResponse,
)
from together.types import EvaluationJob, EvalCreateResponse, EvalListResponse, EvalStatusResponse
```

Methods:

- <code title="post /evaluation">client.evals.<a href="./src/together/resources/evals.py">create</a>(\*\*<a href="src/together/types/eval_create_params.py">params</a>) -> <a href="./src/together/types/eval_create_response.py">EvalCreateResponse</a></code>
- <code title="get /evaluation/{id}">client.evals.<a href="./src/together/resources/evals.py">retrieve</a>(id) -> <a href="./src/together/types/evaluation_job.py">EvaluationJob</a></code>
- <code title="post /evaluation/{id}/update">client.evals.<a href="./src/together/resources/evals.py">update</a>(id, \*\*<a href="src/together/types/eval_update_params.py">params</a>) -> <a href="./src/together/types/eval_update_response.py">EvalUpdateResponse</a></code>
- <code title="get /evaluation">client.evals.<a href="./src/together/resources/evals.py">list</a>(\*\*<a href="src/together/types/eval_list_params.py">params</a>) -> <a href="./src/together/types/eval_list_response.py">EvalListResponse</a></code>
- <code title="get /evaluation/{id}/status">client.evals.<a href="./src/together/resources/evals.py">status</a>(id) -> <a href="./src/together/types/eval_status_response.py">EvalStatusResponse</a></code>
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "together"
version = "2.0.0-alpha.4"
version = "2.0.0-alpha.5"
description = "The official Python library for the together API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -83,7 +83,8 @@ pydantic-v1 = [
"pydantic>=1.9.0,<2",
]
pydantic-v2 = [
"pydantic>=2,<3",
"pydantic~=2.0 ; python_full_version < '3.14'",
"pydantic~=2.12 ; python_full_version >= '3.14'",
]

[build-system]
Expand Down
87 changes: 53 additions & 34 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
-e .
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.13
aiohttp==3.13.2
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.8.0
anyio==4.11.0
# via
# httpx
# together
async-timeout==5.0.1 ; python_full_version < '3.11'
# via aiohttp
attrs==25.3.0
attrs==25.4.0
# via aiohttp
certifi==2024.12.14
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
# via pytest-asyncio
certifi==2025.11.12
# via
# httpcore
# httpx
Expand All @@ -29,20 +31,20 @@ colorama==0.4.6 ; sys_platform == 'win32'
# click
# pytest
# tqdm
dirty-equals==0.9.0
dirty-equals==0.11
distro==1.9.0
# via together
exceptiongroup==1.2.2 ; python_full_version < '3.11'
exceptiongroup==1.3.1 ; python_full_version < '3.11'
# via
# anyio
# pytest
execnet==2.1.1
execnet==2.1.2
# via pytest-xdist
filelock==3.19.1 ; python_full_version < '3.10'
# via together
filelock==3.20.0 ; python_full_version >= '3.10'
# via together
frozenlist==1.7.0
frozenlist==1.8.0
# via
# aiohttp
# aiosignal
Expand All @@ -54,71 +56,84 @@ httpx==0.28.1
# via
# respx
# together
idna==3.10
idna==3.11
# via
# anyio
# httpx
# yarl
importlib-metadata==8.6.1
iniconfig==2.0.0
importlib-metadata==8.7.0
iniconfig==2.1.0 ; python_full_version < '3.10'
# via pytest
markdown-it-py==3.0.0
iniconfig==2.3.0 ; python_full_version >= '3.10'
# via pytest
markdown-it-py==3.0.0 ; python_full_version < '3.10'
# via rich
markdown-it-py==4.0.0 ; python_full_version >= '3.10'
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.6.3
multidict==6.7.0
# via
# aiohttp
# yarl
mypy==1.14.1
mypy-extensions==1.0.0
mypy==1.18.2
mypy-extensions==1.1.0
# via mypy
nodeenv==1.9.1
# via pyright
packaging==24.2
packaging==25.0
# via pytest
pathspec==0.12.1
# via mypy
pillow==11.3.0 ; python_full_version < '3.10'
# via together
pillow==12.0.0 ; python_full_version >= '3.10'
# via together
pluggy==1.5.0
pluggy==1.6.0
# via pytest
propcache==0.3.2
propcache==0.4.1
# via
# aiohttp
# yarl
pydantic==2.10.3
pydantic==2.12.4
# via together
pydantic-core==2.27.1
pydantic-core==2.41.5
# via pydantic
pygments==2.19.1
pygments==2.19.2
# via
# pytest
# rich
pyright==1.1.399
pytest==8.4.1
pytest==8.4.2 ; python_full_version < '3.10'
# via
# pytest-asyncio
# pytest-mock
# pytest-xdist
pytest==9.0.1 ; python_full_version >= '3.10'
# via
# pytest-asyncio
# pytest-mock
# pytest-xdist
pytest-asyncio==0.24.0
pytest-asyncio==1.2.0 ; python_full_version < '3.10'
pytest-asyncio==1.3.0 ; python_full_version >= '3.10'
pytest-mock==3.15.1
pytest-xdist==3.7.0
python-dateutil==2.9.0.post0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0 ; python_full_version < '3.10'
# via time-machine
respx==0.22.0
rich==13.9.4
ruff==0.9.4
six==1.17.0
rich==14.2.0
ruff==0.14.6
six==1.17.0 ; python_full_version < '3.10'
# via python-dateutil
sniffio==1.3.1
# via
# anyio
# together
tabulate==0.9.0
# via together
time-machine==2.16.0
tomli==2.2.1 ; python_full_version < '3.11'
time-machine==2.19.0 ; python_full_version < '3.10'
time-machine==3.1.0 ; python_full_version >= '3.10'
tomli==2.3.0 ; python_full_version < '3.11'
# via
# mypy
# pytest
Expand All @@ -130,20 +145,24 @@ types-tabulate==0.9.0.20241207
# via together
types-tqdm==4.67.0.20250809
# via together
typing-extensions==4.12.2
typing-extensions==4.15.0
# via
# aiosignal
# anyio
# exceptiongroup
# multidict
# mypy
# pydantic
# pydantic-core
# pyright
# rich
# pytest-asyncio
# together
# typing-inspection
typing-inspection==0.4.2
# via pydantic
urllib3==2.5.0
# via types-requests
yarl==1.20.1
yarl==1.22.0
# via aiohttp
zipp==3.21.0
zipp==3.23.0
# via importlib-metadata
11 changes: 7 additions & 4 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ function run_tests() {
echo "==> Running tests with Pydantic v2"
uv run --isolated --all-extras pytest "$@"

echo "==> Running tests with Pydantic v1"
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
# Pydantic v1 does not support Python 3.14, skip these tests
if [[ "$UV_PYTHON" != "3.14" ]]; then
echo "==> Running tests with Pydantic v1"
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
fi
}

# If UV_PYTHON is already set in the environment, just run the command once
Expand All @@ -71,6 +74,6 @@ else
echo "==> Running tests for Python 3.9"
UV_PYTHON=3.9 run_tests "$@"

echo "==> Running tests for Python 3.13"
UV_PYTHON=3.13 run_tests "$@"
echo "==> Running tests for Python 3.14"
UV_PYTHON=3.14 run_tests "$@"
fi
2 changes: 1 addition & 1 deletion src/together/_utils/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def is_typeddict(tp: Type[Any]) -> bool:


def is_literal_type(tp: Type[Any]) -> bool:
return get_origin(tp) in _LITERAL_TYPES
return get_origin(tp) in _LITERAL_TYPES # type: ignore[comparison-overlap]


def parse_date(value: Union[date, StrBytesIntFloat]) -> date:
Expand Down
6 changes: 3 additions & 3 deletions src/together/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ def get_required_header(headers: HeadersLike, header: str) -> str:
lower_header = header.lower()
if is_mapping_t(headers):
# mypy doesn't understand the type narrowing here
for k, v in headers.items(): # type: ignore
if k.lower() == lower_header and isinstance(v, str):
return v
for k, v in headers.items(): # type: ignore[misc, has-type]
if k.lower() == lower_header and isinstance(v, str): # type: ignore[has-type]
return v # type: ignore[has-type]

# to deal with the case where the header looks like Stainless-Event-Id
intercaps_header = re.sub(r"([^\w])(\w)", lambda pat: pat.group(1) + pat.group(2).upper(), header.capitalize())
Expand Down
2 changes: 1 addition & 1 deletion src/together/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "together"
__version__ = "2.0.0-alpha.4" # x-release-please-version
__version__ = "2.0.0-alpha.5" # x-release-please-version
Loading
Loading