Skip to content

feat(custom-models): LoRA adapters on a shared base; release 0.3.0 - #19

Merged
kunwar-vp merged 2 commits into
mainfrom
feat/multi-lora-adapters
Oct 26, 2026
Merged

kunwar-vp merged 2 commits into
mainfrom
feat/multi-lora-adapters

Conversation

@kunwar-vp

Copy link
Copy Markdown
Collaborator

Summary

Adds LoRA adapters on a shared base (public beta) to the Python SDK and releases 0.3.0. Merging tags v0.3.0 and publishes to PyPI.

  • custom_models.create(lora_enabled=True, max_lora_rank=16|64) deploys a shared base. A missing rank fails client-side.
  • New custom_models.adapters (sync and async): attach (Hugging Face, presigned S3, or assume-role S3; inferred from the arguments; optional idempotency key), list, get, delete, wait_until_ready, wait_until_deleted.
  • custom_models.list(include_adapters=True).
  • New CustomModel fields: lora_enabled, max_lora_rank, max_adapters, parent_model_id, adapter_digest; LoraRank exported.
  • Fix: custom_models.wait_until_ready on an adapter. The server answers refresh with 422 ADAPTER_REFRESH_UNSUPPORTED, so it switches to polling get.
  • README section, examples/lora_adapters.py, CHANGELOG [0.3.0].

The first commit regenerates _generated/ from prod OpenAPI 0.26.1. Its tree is identical to #17's (git diff origin/spec-sync/auto -- src/graphn/_generated is empty), so #17 can be closed once this merges.

Chat needs no change: chat.completions.create(model=adapter.id) already adds the custom: prefix, and auto-wake's POST .../wake on an adapter wakes its base.

Tests

  • ruff check src tests and pytest -ra: 109 passed, 21 of them new (tests/test_custom_model_adapters.py).
  • Read-only check against prod with this branch: list(include_adapters=True) succeeds, and adapters.list on an unknown base raises NotFoundError. Nothing was deployed.

No tenant-scope change: every call goes through cp_path, i.e. /v1/{client workspace}/custom-models/..., and the server enforces workspace ownership of both the base and the adapter.

@kunwar-vp
kunwar-vp merged commit c440f72 into main Oct 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant