Appearance
Changelog
SDK 2.0.0 — 2026-05
Major release. First version with first-class support for prompt kinds, environment-scoped releases, and a typed return value.
What's new
- New
environmentargument onPromptManager(...)— required. The SDK now enforces that the active version has been released to your environment. - New
PromptContentreturn type from every fetch — typed accessors per kind (.text,.template,.messages,.response_schema,.base). - New
.render(variables)method — uniform variable substitution across all four kinds. - New
PromptNotReleasedInEnvironmentError— raised on HTTP 409, carriesprompt_name,requested_environment,available_environments. - New
get_active_prompt_version_for_environment— override the constructor's environment on a single call. - On-prem build: configurable
base_url=constructor argument +PROMPT_MANAGER_API_URLenvironment variable.
Breaking changes from 1.x
environmentis now required in the constructor. Calls that worked in 1.x without it will raiseValueError. Addenvironment="..."to yourPromptManager(...)calls.- Return value of
get_active_prompt_versionis now aPromptContent, not a raw dict. Useprompt.text/prompt.template/prompt.render(...)instead of indexing the dict.
Migration from 1.x
python
# 1.x
pm = PromptManager(api_key=K, project_id=P)
response = pm.get_active_prompt_version("welcome")
text = response["content"]["text"]python
# 2.0.0
pm = PromptManager(api_key=K, project_id=P, environment="production")
prompt = pm.get_active_prompt_version("welcome")
text = prompt.text # or prompt.render() for any kindPlatform — 2026-05 — On-prem authorization model
On-prem: membership-based authorization
The on-prem backend now decides API-key access per-call by checking the key owner's current organization membership, rather than relying on a static organization_id on the key. Multi-org users can now use one API key across every org they're a member of.
Impact:
- API keys created in older builds carried an
organization_id; new keys do not. Both work — the field is ignored at SDK call time. - A user removed from an organization loses key access immediately on the next call.
See Authentication( for the full model.
Platform — 2026-05 — 409 contract on environments
Both SaaS and on-prem now return HTTP 409 (instead of 404) when the active version exists but isn't released to the requested environment. The SDK surfaces this as PromptNotReleasedInEnvironmentError with prompt_name, requested_environment, and available_environments populated.
This means you can distinguish "the prompt doesn't exist" from "the prompt exists but isn't released yet" — useful for clearer error messages in production.
SDK 1.1.0 — 2024-12
Last release of the 1.x line.
- Configurable
base_urlfor on-prem. - Stable interface; still supported but no new features.
SDK 1.0.0 — 2024-09
Initial public release.
PromptManager(api_key, project_id)constructor.get_active_prompt_version(prompt_name, headers=None)returning a raw response dict.