Skip to content

refactor: leverage model registry for automatic API key handling - #12

Merged
ShaneIsley merged 1 commit into
mainfrom
claude/review-api-key-handling-CaUUv
Jan 15, 2026
Merged

ShaneIsley merged 1 commit into
mainfrom
claude/review-api-key-handling-CaUUv

Conversation

@ShaneIsley

Copy link
Copy Markdown
Owner

Remove redundant manual API key retrieval from examples. The model registry already handles automatic environment variable resolution for all backends (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.).

Changes:

  • Remove explicit os.getenv("OPENAI_API_KEY") calls
  • Remove api_key from backend_kwargs
  • Add comments explaining automatic API key resolution
  • Remove unused os imports

This makes the examples cleaner and demonstrates the proper way to use the model registry system.

Remove redundant manual API key retrieval from examples. The model
registry already handles automatic environment variable resolution for
all backends (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.).

Changes:
- Remove explicit os.getenv("OPENAI_API_KEY") calls
- Remove api_key from backend_kwargs
- Add comments explaining automatic API key resolution
- Remove unused os imports

This makes the examples cleaner and demonstrates the proper way to use
the model registry system.
@ShaneIsley
ShaneIsley merged commit a6874ca into main Jan 15, 2026
2 of 3 checks passed
@ShaneIsley
ShaneIsley deleted the claude/review-api-key-handling-CaUUv branch January 17, 2026 03:06
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.

2 participants