Skip to content

Commit 9f8a8e4

Browse files
stainless-app[bot]mbrostamiblainekastentimofeev1995dulaj-me
authored
release: 2.6.0 (#306)
* fix: sanitize endpoint path params * feat(api): add random_seed field to fine_tuning cancel and list responses * refactor(tests): switch from prism to steady * chore(tests): bump steady to v0.19.4 * chore(tests): bump steady to v0.19.5 * chore(internal): update gitignore * chore(tests): bump steady to v0.19.6 * fix(types): correct gpu_type literal in jig, timestamp types in deployment * feat: [jig] updated created_at, updated_at format to datetime (#310) * chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. * chore(tests): bump steady to v0.19.7 * docs(api): update voice parameter documentation URL in speech * chore: Disable translation test temporarily (#313) * test(cli): Test coverage for CLI commands (#311) * codegen metadata * chore: Add tests for CLI * Add a dry-run mode * Add tests for endpoints json mode * Add more json mode tests and fix some json mode integrations * add cli model list tests * add tests for model upload * remove dry-run, out of scope * Add tests for files * Add tests for endpoint creation, hardware listing, and model upload with improved environment configuration * fixes for cancel json * add tests for beta clusters * Add tests for jig * fix lints/formats * fix tests * Fix JSON mode with fine-tuning cancel * fix file retrieve short help * fix upload messaging for failed file checks * fix file upload json output * omit usage of deprecated param on ft delete * fix * print human text for humans when cancelling ft cancel job * fix lint --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> * Add packing parameter (#309) * chore(internal): regenerate SDK with no functional changes * feat(internal): implement indices array format for query and form serialization * fix(jig): conditionally install pyproject.toml dependancies in dockerfile only if pyproject.toml is available (#314) * codegen metadata * Fix packing bool flag for cli (#317) * feat(api): add bit_rate parameter to speech create method * codegen metadata * removing typo (#318) * chore(tests): bump steady to v0.20.1 * chore(tests): bump steady to v0.20.2 * release: 2.6.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Mohamad Rostami <mbrostami@proton.me> Co-authored-by: Blaine Kasten <blainekasten@gmail.com> Co-authored-by: Egor Timofeev <43988181+timofeev1995@users.noreply.github.com> Co-authored-by: Dulaj Disanayaka <8828757+dulaj-me@users.noreply.github.com> Co-authored-by: Jasmine <jli@together.ai>
1 parent 3f03f51 commit 9f8a8e4

76 files changed

Lines changed: 2581 additions & 214 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 10
2020
name: lint
2121
runs-on: ${{ github.repository == 'stainless-sdks/togetherai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
22-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
22+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
2323
steps:
2424
- uses: actions/checkout@v6
2525

@@ -38,7 +38,7 @@ jobs:
3838
run: uv run ruff format --check
3939

4040
build:
41-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
41+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
4242
timeout-minutes: 10
4343
name: build
4444
permissions:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.prism.log
2+
.stdy.log
23
_dev
34

45
__pycache__

.release-please-manifest.json

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

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 74
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-31893d157d3c85caa1d8615b73a5fa431ea2cc126bd2410e0f84f3defd5c7dec.yml
3-
openapi_spec_hash: b652a4d504b4a3dbf585ab803b0f59fc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-d91fd4a37aa010c545f29c4413b9aef8f556d0a63d3c0e5a7ee36abf1671142d.yml
3+
openapi_spec_hash: d3365b580d695d006648441db545aff8
44
config_hash: 52d213100a0ca1a4b2cdcd2718936b51

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Changelog
22

3+
## 2.6.0 (2026-03-31)
4+
5+
Full Changelog: [v2.5.0...v2.6.0](https://github.com/togethercomputer/together-py/compare/v2.5.0...v2.6.0)
6+
7+
### Features
8+
9+
* [jig] updated created_at, updated_at format to datetime ([#310](https://github.com/togethercomputer/together-py/issues/310)) ([5a27da9](https://github.com/togethercomputer/together-py/commit/5a27da92da7199057d5c1a1c2749044cb325b269))
10+
* **api:** add bit_rate parameter to speech create method ([e447ab6](https://github.com/togethercomputer/together-py/commit/e447ab6b6714e6615bd7285f53bc6a8f71a6edf8))
11+
* **api:** add random_seed field to fine_tuning cancel and list responses ([57dcc89](https://github.com/togethercomputer/together-py/commit/57dcc89748da91dc5e5b70bc24b9e43702fd51ab))
12+
* **internal:** implement indices array format for query and form serialization ([f896e54](https://github.com/togethercomputer/together-py/commit/f896e543c6df5db1657a6ad5ba91925a7d582768))
13+
14+
15+
### Bug Fixes
16+
17+
* **jig:** conditionally install pyproject.toml dependancies in dockerfile only if pyproject.toml is available ([#314](https://github.com/togethercomputer/together-py/issues/314)) ([e06478c](https://github.com/togethercomputer/together-py/commit/e06478cc88c03bfb1915c6bb1e19d1b955bd7065))
18+
* sanitize endpoint path params ([c445ed8](https://github.com/togethercomputer/together-py/commit/c445ed815d6209356ae033cb8408f959fe57c502))
19+
* **types:** correct gpu_type literal in jig, timestamp types in deployment ([ef08cec](https://github.com/togethercomputer/together-py/commit/ef08cec1c13209592ad8547606c2363292589ff0))
20+
21+
22+
### Chores
23+
24+
* **ci:** skip lint on metadata-only changes ([d22b49f](https://github.com/togethercomputer/together-py/commit/d22b49f397c4d9b79290c37f0840eee2b2d3ffea))
25+
* Disable translation test temporarily ([#313](https://github.com/togethercomputer/together-py/issues/313)) ([4c2075d](https://github.com/togethercomputer/together-py/commit/4c2075ddb818c5d156734c851abd3ae28a865a95))
26+
* **internal:** regenerate SDK with no functional changes ([e541c40](https://github.com/togethercomputer/together-py/commit/e541c4017882f28c00dbf711cf6ecba050deef6f))
27+
* **internal:** update gitignore ([6c7113e](https://github.com/togethercomputer/together-py/commit/6c7113e73c0dab048935c14b48f5a7c27501ef33))
28+
* **tests:** bump steady to v0.19.4 ([f2583ae](https://github.com/togethercomputer/together-py/commit/f2583aeb228f05440305b05d03c1b1e1a5926f2a))
29+
* **tests:** bump steady to v0.19.5 ([e8de9f6](https://github.com/togethercomputer/together-py/commit/e8de9f612adbfc2d1612103c87ae5fd5242de766))
30+
* **tests:** bump steady to v0.19.6 ([3f935af](https://github.com/togethercomputer/together-py/commit/3f935afab8e7714da23490d89752515b7ab37ad9))
31+
* **tests:** bump steady to v0.19.7 ([859e9ba](https://github.com/togethercomputer/together-py/commit/859e9ba7b53111631abe46ec0c19c0556162c8f2))
32+
* **tests:** bump steady to v0.20.1 ([a4b6f3d](https://github.com/togethercomputer/together-py/commit/a4b6f3d2472231dda03c4a776bfdebcf21de1fc9))
33+
* **tests:** bump steady to v0.20.2 ([b38453b](https://github.com/togethercomputer/together-py/commit/b38453bac5db8f1c34e1ea945c60a0bb68a632eb))
34+
35+
36+
### Documentation
37+
38+
* **api:** update voice parameter documentation URL in speech ([fe89657](https://github.com/togethercomputer/together-py/commit/fe896570536c106938c4dc1f7585b590bb2913be))
39+
40+
41+
### Refactors
42+
43+
* **tests:** switch from prism to steady ([0b4c343](https://github.com/togethercomputer/together-py/commit/0b4c343fb6f72a4fda7593bdf6ea133cfad1ca29))
44+
345
## 2.5.0 (2026-03-18)
446

547
Full Changelog: [v2.4.0...v2.5.0](https://github.com/togethercomputer/together-py/compare/v2.4.0...v2.5.0)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ $ pip install ./path-to-wheel-file.whl
8585

8686
## Running tests
8787

88-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
88+
Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.
8989

9090
```sh
9191
$ ./scripts/mock

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "together"
3-
version = "2.5.0"
3+
version = "2.6.0"
44
description = "The official Python library for the together API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

scripts/mock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@ fi
1919

2020
echo "==> Starting mock server with URL ${URL}"
2121

22-
# Run prism mock on the given spec
22+
# Run steady mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
2424
# Pre-install the package so the download doesn't eat into the startup timeout
25-
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
25+
npm exec --package=@stdy/cli@0.20.2 -- steady --version
2626

27-
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
27+
npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
2828

29-
# Wait for server to come online (max 30s)
29+
# Wait for server to come online via health endpoint (max 30s)
3030
echo -n "Waiting for server"
3131
attempts=0
32-
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
32+
while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do
33+
if ! kill -0 $! 2>/dev/null; then
34+
echo
35+
cat .stdy.log
36+
exit 1
37+
fi
3338
attempts=$((attempts + 1))
3439
if [ "$attempts" -ge 300 ]; then
3540
echo
36-
echo "Timed out waiting for Prism server to start"
37-
cat .prism.log
41+
echo "Timed out waiting for Steady server to start"
42+
cat .stdy.log
3843
exit 1
3944
fi
4045
echo -n "."
4146
sleep 0.1
4247
done
4348

44-
if grep -q "✖ fatal" ".prism.log"; then
45-
cat .prism.log
46-
exit 1
47-
fi
48-
4949
echo
5050
else
51-
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
51+
npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
5252
fi

scripts/test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ GREEN='\033[0;32m'
99
YELLOW='\033[0;33m'
1010
NC='\033[0m' # No Color
1111

12-
function prism_is_running() {
13-
curl --silent "http://localhost:4010" >/dev/null 2>&1
12+
function steady_is_running() {
13+
curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1
1414
}
1515

1616
kill_server_on_port() {
@@ -25,7 +25,7 @@ function is_overriding_api_base_url() {
2525
[ -n "$TEST_API_BASE_URL" ]
2626
}
2727

28-
if ! is_overriding_api_base_url && ! prism_is_running ; then
28+
if ! is_overriding_api_base_url && ! steady_is_running ; then
2929
# When we exit this script, make sure to kill the background mock server process
3030
trap 'kill_server_on_port 4010' EXIT
3131

@@ -36,19 +36,19 @@ fi
3636
if is_overriding_api_base_url ; then
3737
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
3838
echo
39-
elif ! prism_is_running ; then
40-
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
39+
elif ! steady_is_running ; then
40+
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server"
4141
echo -e "running against your OpenAPI spec."
4242
echo
4343
echo -e "To run the server, pass in the path or url of your OpenAPI"
44-
echo -e "spec to the prism command:"
44+
echo -e "spec to the steady command:"
4545
echo
46-
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
46+
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
4747
echo
4848

4949
exit 1
5050
else
51-
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
51+
echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}"
5252
echo
5353
fi
5454

src/together/_qs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def _stringify_item(
101101
items.extend(self._stringify_item(key, item, opts))
102102
return items
103103
elif array_format == "indices":
104-
raise NotImplementedError("The array indices format is not supported yet")
104+
items = []
105+
for i, item in enumerate(value):
106+
items.extend(self._stringify_item(f"{key}[{i}]", item, opts))
107+
return items
105108
elif array_format == "brackets":
106109
items = []
107110
key = key + "[]"

0 commit comments

Comments
 (0)