Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexible API key management for OpenAI #2164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markpollack
Copy link
Member

Introduces a new API key management system that allows users to customize how API keys are provided and managed in their Spring AI applications. This change improves security and flexibility by:

  • Adding core ApiKey interface and SimpleApiKey implementation
  • Introducing @OPENAIAPIKEY qualifier for bean disambiguation
  • Supporting custom API key providers for secure key management
  • Adding auto-configuration support for API key injection
  • Adding builder pattern for OpenAiApi configuration
  • Deprecating public constructors in favor of builder API (since 1.0.0.M6)

The new system enables users to implement their own key management strategies while maintaining backward compatibility with property-based configuration.

Introduces a new API key management system that allows users to customize how
API keys are provided and managed in their Spring AI applications. This
change improves security and flexibility by:

- Adding core ApiKey interface and SimpleApiKey implementation
- Introducing @OPENAIAPIKEY qualifier for bean disambiguation
- Supporting custom API key providers for secure key management
- Adding auto-configuration support for API key injection
- Adding builder pattern for OpenAiApi configuration
- Deprecating public constructors in favor of builder API (since 1.0.0.M6)

The new system enables users to implement their own key management
strategies while maintaining backward compatibility with property-based
configuration.
@markpollack markpollack added this to the 1.0.0-M6 milestone Feb 3, 2025
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