Skip to content

0.21.0: Explicitly pass model, base_url and api_key to agent builder instead of relying on env vars. - #49

Merged
MathisWellmann merged 7 commits into
mainfrom
envs
Jul 25, 2026
Merged

0.21.0: Explicitly pass model, base_url and api_key to agent builder instead of relying on env vars.#49
MathisWellmann merged 7 commits into
mainfrom
envs

Conversation

@MathisWellmann

Copy link
Copy Markdown
Owner

Changes:

  • pass in model to agent_builder instead of loading it from env var MODEL
  • Include base_url, api_key as well in agent_bulder.
  • New helper function agent_builder_from_env which loads BASE_URL and API_KEY like before in agent_builder

…DEL env var.

agent_builder and init_agent now take the model slug as a parameter, and
init_observability takes it for the global 'model' metric label (falling
back to 'unknown' only for an empty string). The library no longer reads
the MODEL environment variable anywhere; BASE_URL and API_KEY remain
env-based. All examples read MODEL themselves and pass it through, so
their documented .env workflow is unchanged.
agent_builder and init_agent now take the inference endpoint and
credentials explicitly, so the library core reads no configuration from
the process environment at all. The new agent_builder_from_env /
init_agent_from_env conveniences keep the one-liner ergonomics for
binaries following the BASE_URL/API_KEY env convention; all examples use
them, so their documented .env workflow is unchanged.

(The Prometheus exporter's INSTANCE fleet-identity label, with its
hostname-pid fallback, deliberately stays env-based.)
@MathisWellmann MathisWellmann self-assigned this Jul 24, 2026
@MathisWellmann
MathisWellmann force-pushed the envs branch 2 times, most recently from 929f44f to a2da2bb Compare July 25, 2026 13:41
@MathisWellmann
MathisWellmann merged commit 91ece4b into main Jul 25, 2026
5 checks passed
@MathisWellmann
MathisWellmann deleted the envs branch July 25, 2026 22:03
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