You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python SDK generator: support baseUrlEnvVar (x-fern-base-url-env / base-url-env) #18351
Why: Users could then write Client() instead of Client(base_url=os.environ["MY_API_BASE_URL"]), the same way the API key already defaults from MY_API_KEY. Right now the IR carries the field and Python drops it. With CLI 5.159.3 and fern-python-sdk 5.41.2, fern ir shows "baseUrlEnvVar": "MY_API_BASE_URL", but the generated SDK is byte-for-byte identical to the output without the extension.
Side note: #17705 says base-url-env is also accepted under api.environments in generators.yml, but CLI 5.159.3's fern check rejects it there with Unexpected key "base-url-env".
Any alternatives?
Overriding init in a hand-written client subclass to default base_url from the env var. It works, but every Fern Python user has to reimplement it.
Activity