chore(stainless): migrate SDK generation config into the repo - #433
Open
aringuyen3 wants to merge 6 commits into
Open
aringuyen3 wants to merge 6 commits into
aringuyen3 wants to merge 6 commits into
Conversation
| { | ||
| "openapi_spec": "../agentex/openapi.yaml", | ||
| "stainless_config": "stainless.yml", | ||
| "output_path": "./sdks" |
Collaborator
There was a problem hiding this comment.
Not super familiar but is this an artifact of testing locally? Shouldn't the output path be to the sdk repos?
Contributor
Author
There was a problem hiding this comment.
./sdks is stlc's checkout area for the SDK repos, not a build output dir — it's gitignored, and the actual destinations are the staging_repo/production_repo entries in stainless.yml.
python:
production_repo: scaleapi/scale-agentex-python
staging_repo: scaleapi/scale-agentex-python-staging
publish: { pypi: true }
declan-scale
approved these changes
Sep 16, 2026
declan-scale
left a comment
Collaborator
There was a problem hiding this comment.
Just the one question, otherwise looks good
Adds the TypeScript and Python custom-code tracking files produced by the local stlc builds, and drops the superseded main-branch Python record. Its content is fully absorbed into the new seal — the two integrated trees have identical path sets — and its base/integrated refs remain on the staging SDK remote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The latest local build moved the sealed base forward. Both the new base and the integrated commit are already on the staging SDK remote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The workspace pointed at a copy written by stlc init. Nothing kept it in sync with the generated spec, so a merge or a release version bump would have silently split them and made local SDK generation build from a stale API surface. CI already reads the generated spec. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two tracking files were sealed for branches no longer built here. stlc only consolidates records matching the current branch, so they would have been re-merged on every build forever while status claimed they were about to be consolidated. Both are fully absorbed into the surviving seal: identical tree path sets, and all 30 files the older record customizes have byte-identical blobs in it. The second pointed at the same integrated commit already. Re-sealing after removal produced no change, and their base/integrated refs remain on the staging SDK remote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both environments were left on the scaffold default of http://localhost:5003, and production is what a client picks when no base URL is supplied — so a plain `Agentex(api_key=...)` called the developer's own machine instead of the API. Set production to the deployed endpoint and leave localhost as development. Regenerated both SDKs so the clients carry it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
aringuyen3
force-pushed
the
aringuyen/stainless
branch
from
September 17, 2026 01:31
ba187d0 to
2736348
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of the Stainless migration: the SDK generation config that lived in
the Stainless app now lives in this repo, versioned and reviewed alongside the
API it describes.
workspace.jsonpoints atagentex/openapi.yaml— the spec generated bymake gen-openapi— so there is no second copy of the spec to drift.stainless.ymlholds the config: targets, environments, resources, auth andspec transforms. Targets point at the existing staging and production SDK repos.
custom-code/carries one tracking file per target, pointing at the sealedcustom-code commits in the staging SDK repos — this is how hand-written SDK
code survives regeneration.
sdks/andbuilds/are gitignored; generated output is not committed here.The hosted Stainless build (
.github/workflows/stainless.yml) is unchanged andstill runs — this PR does not retire it.
No product code changes: nothing under
agentex/oragentex-ui/is touched.🤖 Generated with Claude Code
Do not merge until employee details are removed and the TODOs link tracked work.
Summary
The Stainless SDK generation setup now lives in the repository next to the API spec instead of only in the hosted Stainless app. The configuration covers TypeScript and Python SDKs while keeping generated output and existing custom-code references separate.
Diagram
sequenceDiagram participant Dev as Developer participant WS as workspace.json participant Spec as agentex/openapi.yaml participant Config as stainless.yml participant Gen as Stainless participant SDK as Ignored sdks directory participant Repo as SDK repositories Dev->>Gen: Start SDK generation Gen->>WS: Read workspace paths WS-->>Gen: OpenAPI, config, and output paths Gen->>Spec: Read API spec Gen->>Config: Read targets, environments, auth, and resources Gen->>Gen: Apply tracked custom code Gen->>SDK: Write generated SDKs Gen->>Repo: Publish configured targetsReviews (3) · Last reviewed commit: "fix(stainless): point the production SDK..."