Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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.39.0"
".": "0.40.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 75
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-76f8801298719cc87e9dc4c64b321bcfd432416d76488499d340b4bb6bf81b9b.yml
openapi_spec_hash: ce0b83ef0a5f174461bd7d13a379b636
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-f5cce4e374b601983a3951d614fe8f964dc21b5ef913acdf6680e71393eb9af4.yml
openapi_spec_hash: b91f36b9f8c40bc03b72ec5a73effcbc
config_hash: 52d213100a0ca1a4b2cdcd2718936b51
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.40.0 (2026-04-23)

Full Changelog: [v0.39.0...v0.40.0](https://github.com/togethercomputer/together-typescript/compare/v0.39.0...v0.40.0)

### Features

* **api:** accept string URLs for audio_inputs and source_video in videos ([9313762](https://github.com/togethercomputer/together-typescript/commit/93137622f3c3fe9158c5692a69a7a191aee27d45))
* **api:** add cuda/nvidia driver fields, auto-scaling, OIDC, scheduled capacity to clusters ([881242f](https://github.com/togethercomputer/together-typescript/commit/881242f30f5436353c4c977d4a205df35aedb9d1))
* **api:** add h100-40gb-mig and b200-192gb gpu_type options to jig resource ([dcadaf2](https://github.com/togethercomputer/together-typescript/commit/dcadaf20bdcd7a2d238a16e4ba7c807536e3dfab))
* **api:** add max_seq_length parameter to fine-tuning ([2dd78f9](https://github.com/togethercomputer/together-typescript/commit/2dd78f9636d4a43d15a5fd1b180194d20684cca0))
* **api:** add num_workers parameter to evals model/judge requests ([c61a7c1](https://github.com/togethercomputer/together-typescript/commit/c61a7c1cc7eafa0913d853e993992961cc38ebaf))


### Bug Fixes

* **types:** rename cuda_driver_version to cuda_version in clusters ([e83d0c4](https://github.com/togethercomputer/together-typescript/commit/e83d0c40631b352675cc6bc1149e86cfd9dbbcdd))
* **types:** update driver_versions structure, require supported_instance_types in cluster regions ([d1caf1c](https://github.com/togethercomputer/together-typescript/commit/d1caf1cb6f030a67980ec7c5569fcf521745f191))


### Chores

* **internal:** codegen related update ([f9b079e](https://github.com/togethercomputer/together-typescript/commit/f9b079e57f54ed0f4e0d4671d298efef8543874d))
* **internal:** codegen related update ([4ba1386](https://github.com/togethercomputer/together-typescript/commit/4ba1386fb9a20d7cd2a33c07c5e2fbb42e80d9fe))
* **internal:** more robust bootstrap script ([5c001e2](https://github.com/togethercomputer/together-typescript/commit/5c001e23c5b364f21daf5d31e0111e9e15f40885))
* **tests:** bump steady to v0.22.1 ([3d2bf61](https://github.com/togethercomputer/together-typescript/commit/3d2bf615258e63639612b29b0c544dc8c7c88b10))


### Documentation

* **api:** expand billing_type documentation in cluster creation ([f74418e](https://github.com/togethercomputer/together-typescript/commit/f74418e05cab6a9540d2482ffbecdec9fe0272c4))
* improve examples ([bdf968a](https://github.com/togethercomputer/together-typescript/commit/bdf968a7f48622f0865040dd8f9b81d029ce8e3e))

## 0.39.0 (2026-04-03)

Full Changelog: [v0.38.0...v0.39.0](https://github.com/togethercomputer/together-typescript/compare/v0.38.0...v0.39.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "together-ai",
"version": "0.39.0",
"version": "0.40.0",
"description": "The official TypeScript library for the Together API",
"author": "Together <dev-feedback@TogetherAI.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

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

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
Expand Down
6 changes: 3 additions & 3 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
# Run steady mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stdy/cli@0.20.2 -- steady --version
npm exec --package=@stdy/cli@0.22.1 -- steady --version

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 &
npm exec --package=@stdy/cli@0.22.1 -- 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 &

# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
Expand All @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
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"
npm exec --package=@stdy/cli@0.22.1 -- 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"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
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}"
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- 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}"
echo

exit 1
Expand Down
4 changes: 2 additions & 2 deletions src/internal/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*/
export const readEnv = (env: string): string | undefined => {
if (typeof (globalThis as any).process !== 'undefined') {
return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
return (globalThis as any).process.env?.[env]?.trim() || undefined;
}
if (typeof (globalThis as any).Deno !== 'undefined') {
return (globalThis as any).Deno.env?.get?.(env)?.trim();
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
}
return undefined;
};
123 changes: 113 additions & 10 deletions src/resources/beta/clusters/clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ export interface Cluster {

control_plane_nodes: Array<Cluster.ControlPlaneNode>;

driver_version: 'CUDA_12_5_555' | 'CUDA_12_6_560' | 'CUDA_12_6_565' | 'CUDA_12_8_570';

duration_hours: number;
cuda_version: string;

gpu_type: 'H100_SXM' | 'H200_SXM' | 'RTX_6000_PCI' | 'L40_PCIE' | 'B200_SXM' | 'H100_SXM_INF';

Expand All @@ -88,6 +86,8 @@ export interface Cluster {

num_gpus: number;

nvidia_driver_version: string;

region: string;

/**
Expand All @@ -107,6 +107,20 @@ export interface Cluster {
| 'Deleting';

volumes: Array<Cluster.Volume>;

capacity_pool_id?: string;

created_at?: string;

duration_hours?: number;

install_traefik?: boolean;

reservation_end_time?: string;

reservation_start_time?: string;

slurm_shm_size_gib?: number;
}

export namespace Cluster {
Expand Down Expand Up @@ -142,6 +156,8 @@ export namespace Cluster {
num_gpus: number;

status: string;

instance_id?: string;
}

export interface Volume {
Expand Down Expand Up @@ -170,9 +186,10 @@ export interface ClusterListRegionsResponse {
export namespace ClusterListRegionsResponse {
export interface Region {
/**
* List of supported identifiable driver versions available in the region.
* List of supported identifiable cuda/nvidia driver versions pairs available in
* the region.
*/
driver_versions: Array<string>;
driver_versions: Array<Region.DriverVersion>;

/**
* Identifiable name of the region.
Expand All @@ -182,27 +199,47 @@ export namespace ClusterListRegionsResponse {
/**
* List of supported identifiable gpus available in the region.
*/
supported_instance_types?: Array<string>;
supported_instance_types: Array<string>;
}

export namespace Region {
/**
* CUDA/NVIDIA driver versions pair available in the region to use in the create
* cluster request.
*/
export interface DriverVersion {
/**
* CUDA driver version.
*/
cuda_version: string;

/**
* NVIDIA driver version.
*/
nvidia_driver_version: string;
}
}
}

export interface ClusterCreateParams {
/**
* RESERVED billing types allow you to specify the duration of the cluster
* reservation via the duration_days field. ON_DEMAND billing types will give you
* ownership of the cluster until you delete it.
* ownership of the cluster until you delete it. SCHEDULED_CAPACITY billing types
* allow you to reserve capacity for a scheduled time window. You must specify the
* reservation_start_time and reservation_end_time with this request.
*/
billing_type: 'RESERVED' | 'ON_DEMAND';
billing_type: 'RESERVED' | 'ON_DEMAND' | 'SCHEDULED_CAPACITY';

/**
* Name of the GPU cluster.
*/
cluster_name: string;

/**
* NVIDIA driver version to use in the cluster.
* CUDA version for this cluster. For example, 12.5
*/
driver_version: 'CUDA_12_5_555' | 'CUDA_12_6_560' | 'CUDA_12_6_565' | 'CUDA_12_8_570';
cuda_version: string;

/**
* Type of GPU to use in the cluster
Expand All @@ -215,12 +252,36 @@ export interface ClusterCreateParams {
*/
num_gpus: number;

/**
* Nvidia driver version for this cluster. For example, 550. Only some combination
* of cuda_version and nvidia_driver_version are supported.
*/
nvidia_driver_version: string;

/**
* Region to create the GPU cluster in. Usable regions can be found from
* `client.clusters.list_regions()`
*/
region: string;

/**
* Maximum number of GPUs to which the cluster can be auto-scaled up. This field is
* required if auto_scaled is true.
*/
auto_scale_max_gpus?: number;

/**
* Whether GPU cluster should be auto-scaled based on the workload. By default, it
* is not auto-scaled.
*/
auto_scaled?: boolean;

/**
* ID of the capacity pool to use for the cluster. This field is optional and only
* applicable if the cluster is created from a capacity pool.
*/
capacity_pool_id?: string;

/**
* Type of cluster to create.
*/
Expand All @@ -231,11 +292,47 @@ export interface ClusterCreateParams {
*/
duration_days?: number;

/**
* Whether automated GPU node failover should be enabled for this cluster. By
* default, it is disabled.
*/
gpu_node_failover_enabled?: boolean;

/**
* Whether to install Traefik ingress controller in the cluster. This field is only
* applicable for Kubernetes clusters and is false by default.
*/
install_traefik?: boolean;

/**
* Reservation end time of the cluster. This field is required for SCHEDULED
* billing to specify the reservation end time for the cluster.
*/
reservation_end_time?: string;

/**
* Reservation start time of the cluster. This field is required for SCHEDULED
* billing to specify the reservation start time for the cluster. If not provided,
* the cluster will be provisioned immediately.
*/
reservation_start_time?: string;

/**
* Inline configuration to create a shared volume with the cluster creation.
*/
shared_volume?: ClusterCreateParams.SharedVolume;

/**
* Custom Slurm image for Slurm clusters.
*/
slurm_image?: string;

/**
* Shared memory size in GiB for Slurm cluster. This field is required if
* cluster_type is SLURM.
*/
slurm_shm_size_gib?: number;

/**
* ID of an existing volume to use with the cluster creation.
*/
Expand Down Expand Up @@ -275,6 +372,12 @@ export interface ClusterUpdateParams {
* example, 8, 16 or 24
*/
num_gpus?: number;

/**
* Timestamp at which the cluster should be decommissioned. Only accepted for
* prepaid clusters.
*/
reservation_end_time?: string;
}

Clusters.Storage = Storage;
Expand Down
6 changes: 3 additions & 3 deletions src/resources/beta/jig/jig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export interface Deployment {
/**
* GPUType specifies the type of GPU requested (if any) for this deployment
*/
gpu_type?: 'h100-80gb' | ' a100-80gb';
gpu_type?: 'h100-80gb' | 'h100-40gb-mig' | 'b200-192gb';

/**
* HealthCheckPath is the HTTP path used for health checks of the application
Expand Down Expand Up @@ -445,7 +445,7 @@ export interface JigUpdateParams {
/**
* GPUType specifies the GPU hardware to use (e.g., "h100-80gb")
*/
gpu_type?: 'h100-80gb';
gpu_type?: 'h100-80gb' | 'h100-40gb-mig' | 'b200-192gb';

/**
* HealthCheckPath is the HTTP path for health checks (e.g., "/health"). Set to
Expand Down Expand Up @@ -615,7 +615,7 @@ export interface JigDeployParams {
/**
* GPUType specifies the GPU hardware to use (e.g., "h100-80gb").
*/
gpu_type: 'h100-80gb';
gpu_type: 'h100-80gb' | 'h100-40gb-mig' | 'b200-192gb';

/**
* Image is the container image to deploy from registry.together.ai.
Expand Down
Loading
Loading