Skip to content
Open
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
41 changes: 2 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/togetherai-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -37,7 +37,7 @@ jobs:
build:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/togetherai-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
Expand All @@ -55,40 +55,3 @@ jobs:

- name: Check build
run: ./scripts/build

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/togetherai-typescript' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/togetherai-typescript' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/togetherai-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.TOGETHER_NPM_TOKEN || secrets.NPM_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Please
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
if: github.repository == 'togethercomputer/together-typescript'
runs-on: ubuntu-latest

steps:
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/stlc-promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Promote SDKs

on:
push:
branches: [main]

permissions:
contents: read

jobs:
promote:
runs-on: ubuntu-latest
env:
PRODUCTION_REPO: togethercomputer/together-typescript
GH_TOKEN: ${{ secrets.PRODUCTION_REPO_TOKEN }}
steps:
- name: Check out staging
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- name: Fetch production main
run: |
git remote add production \
"https://x-access-token:${GH_TOKEN}@github.com/${PRODUCTION_REPO}.git"
git fetch production main

- name: Check if production is already in sync
id: diff
run: |
STAGING_SHA=$(git rev-parse origin/main)
PRODUCTION_SHA=$(git rev-parse production/main)
if [ "$STAGING_SHA" = "$PRODUCTION_SHA" ]; then
echo "Production is already at $STAGING_SHA. Nothing to release."
echo "synced=true" >> "$GITHUB_OUTPUT"
else
echo "synced=false" >> "$GITHUB_OUTPUT"
fi

- name: Push staging main to the release branch on production
if: steps.diff.outputs.synced == 'false'
run: |
git push production origin/main:refs/heads/stainless/release --force

- name: Open or update the release PR on production
if: steps.diff.outputs.synced == 'false'
run: |
EXISTING_PR=$(gh pr list \
--repo "${PRODUCTION_REPO}" \
--head stainless/release \
--state open \
--json number \
--jq '.[0].number')
if [ -z "${EXISTING_PR}" ]; then
gh pr create \
--repo "${PRODUCTION_REPO}" \
--base main \
--head stainless/release \
--title "Release SDK updates" \
--body "$(git log --oneline production/main..origin/main)"
else
echo "Release PR #${EXISTING_PR} already exists. Force-push has updated it."
fi
3 changes: 0 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
configured_endpoints: 82
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai/togetherai-891d6a19c1efb39d010d53a8965fd314acf279fcb09f7a6622df5fc6ce779bec.yml
openapi_spec_hash: 4554c2095bf588ac4a195d038f3893c1
config_hash: b35d5968fb07cce1c1be735f874898b1
4 changes: 4 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

errors=()

if [ -z "${RELEASE_PLEASE_TOKEN}" ]; then
errors+=("The RELEASE_PLEASE_TOKEN secret has not been set. Create a fine-grained GitHub PAT and add it as a repository secret.")
fi

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
Expand Down
4 changes: 2 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"prerelease": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
Expand Down
15 changes: 8 additions & 7 deletions scripts/mock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \

if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/togetherai-typescript/$SHA'\033[0m"
echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/together-typescript-staging/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
Expand Down
6 changes: 0 additions & 6 deletions src/resources/beta/clusters/clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,12 +672,6 @@ 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.
Expand Down
4 changes: 2 additions & 2 deletions src/resources/evals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export namespace EvaluationJob {
result_file_id?: string;

/**
* Number of samples that resulted in a tie
* Number of samples that resulted in a tie score
*/
Ties?: number;
}
Expand Down Expand Up @@ -387,7 +387,7 @@ export namespace EvalStatusResponse {
result_file_id?: string;

/**
* Number of samples that resulted in a tie
* Number of samples that resulted in a tie score
*/
Ties?: number;
}
Expand Down
1 change: 0 additions & 1 deletion tests/api-resources/beta/clusters/clusters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ describe('resource clusters', () => {
},
cluster_type: 'KUBERNETES',
duration_days: 0,
gpu_node_failover_enabled: true,
install_traefik: true,
num_capacity_pool_gpus: 0,
num_preemptible_gpus: 0,
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1239,9 +1239,9 @@ bindings@~1.2.1:
integrity sha512-u4cBQNepWxYA55FunZSM7wMi55yQaN0otnhhilNoWHq0MfOfJeQx0v0mRRpolGOExPjZcl6FtB0BB8Xkb88F0g==

brace-expansion@^2.0.2:
version "2.1.0"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae"
integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==
version "2.1.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8"
integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==
dependencies:
balanced-match "^1.0.0"

Expand Down
Loading