[codex] Add Lambda Labs cloud adapter#726
Conversation
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the adapter is well-tested, all previous blocking issues are resolved, and the two remaining observations are about optional config fields that default to undefined and are stripped before the API call. All bugs identified in the previous review round are addressed: packages/cloud/lambda-labs/src/index.ts — the launch body includes Important Files Changed
Sequence DiagramsequenceDiagram
participant CLI
participant Adapter as cloud-lambda-labs
participant API as Lambda Labs API
CLI->>Adapter: connect(ctx)
Adapter->>API: GET /instances (token verify)
API-->>Adapter: "200 { data: [...] }"
Adapter-->>CLI: "{ accountId }"
CLI->>Adapter: quote(ctx, spec, config)
Adapter->>API: GET /instance-types
API-->>Adapter: "{ data: { type_name: {...} } }"
Adapter->>Adapter: pickInstanceType(items, spec, region)
Adapter-->>CLI: "Quote { hourly, sku, ... }"
CLI->>Adapter: provision(ctx, spec, config)
Note over Adapter: dryRun → return stub immediately
Adapter->>API: GET /instance-types
API-->>Adapter: instance types
Adapter->>Adapter: pickInstanceType + price check
Adapter->>API: POST /instance-operations/launch
API-->>Adapter: "{ data: { instance_ids: [id] } }"
Adapter-->>CLI: "Instance { id, status: provisioning }"
CLI->>Adapter: status(ctx, id)
Adapter->>API: "GET /instances/{id}"
API-->>Adapter: "{ data: LambdaInstance }"
Adapter->>Adapter: instanceToInstance (status map, createdAt)
Adapter-->>CLI: "Instance { id, status: running, ... }"
CLI->>Adapter: destroy(ctx, id)
Adapter->>API: POST /instance-operations/terminate
API-->>Adapter: "{ data: { terminated_instances: [...] } }"
Reviews (4): Last reviewed commit: "Require Lambda launch instance ID" | Re-trigger Greptile |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
ee67c32 to
3d0a085
Compare
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
8 similar comments
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
Summary
@profullstack/sh1pt-cloud-lambda-labsfor Lambda Labs GPU Cloudlambda-labsin CLI adapter discovery, default scale pricing, docs, andpnpm-lock.yamlValidation
git diff --checknode --check packages/cloud/lambda-labs/src/index.tsnode --check packages/cloud/lambda-labs/src/index.test.tscorepack pnpm --filter @profullstack/sh1pt-core buildcorepack pnpm --filter @profullstack/sh1pt-cloud-lambda-labs typecheckcorepack pnpm vitest run packages/cloud/lambda-labs/src/index.test.tscorepack pnpm install --frozen-lockfile --lockfile-only --ignore-scripts --filter @profullstack/sh1pt-cloud-lambda-labs...Notes
https://docs.lambda.ai/public-cloud/cloud-api/).LAMBDA_CLOUD_API_KEYand one Lambda Cloud SSH key name;dryRunreturns before any billable API call.packages/cli/node_modules; the new adapter package typecheck and focused tests pass.