OpenAI's API returns additional token usage metrics that provide deeper
insight into API consumption. This adds support for:
- acceptedPredictionTokens: Tokens from accepted model predictions
- audioTokens: Tokens used for audio processing
- rejectedPredictionTokens: Tokens from rejected model predictions
These fields help track resource utilization and costs more accurately
by breaking down token usage by type. Added @JsonIgnoreProperties to
maintain compatibility with future OpenAI API additions.
Fixes warning logging in RetryUtils.SHORT_RETRY_TEMPLATE to reduce noise
in test output.
The DEFAULT_RETRY_TEMPLATE uses exponential backoff starting at 2s with max 3min
delay between retries, making tests run unnecessarily long. This change
introduces SHORT_RETRY_TEMPLATE with fixed 100ms backoff to speed up test
execution while preserving the same retry behavior and error handling.
- Disable project-wide Checkstyle checks to unblock development
- Add documentation for enabling Checkstyle locally
- Fix remaining checkstyle violations in current codebase
Fixes#1669
- Remove unnecessary spring-web dependencies
- Update third-party library versions
- Refactor API classes to use consistent header handling
- Remove ApiUtils class and inline its functionality
- Adjust RestClient and WebClient builder usage in autoconfiguration
- Replace direct RestClient.Builder injections with ObjectProvider<RestClient.Builder>
and WebClient.Builder injections with ObjectProvider<WebClient.Builder>
- Update ChromaVectorStoreAutoConfiguration to use ObjectProvider
- Rename MongoDbAtlasLocalContainerConnectionDetailsFactoryTest to IT
- Switch spring-ai-chroma-store dependency from spring-web to spring-webflux
- Simplify ChromaApi constructor by using method reference for default headers
- Adjust import order
Resolves#1066Resolves#524
- Establish a new "spring-ai-retry" project, implementing a default HTTP error handler,
RetryTemplate, and handling both Transient and Non-Transient Exceptions.
- Streamline existing clients (e.g., OpenAI and MistralAI) to utilize "spring-ai-retry."
- Integrate retry auto-configuration with customizable properties, extending it to OpenAI and MistralAI Auto-Configs.
- Allow configuration of RetryTemplate and ResponseErrorHandler for various clients, including OpenAIChatClient,
OpenAiEmbeddingClient, OpenAiAudioTranscriptionCline, OpenAiImageClient, MistralAiChatClient, and MistralAiEmbeddingClient.
- Add tests for default RestTemplate and ResponseErrorHandler configurations in OpenAI and MistralAI.
- Introduce new retry auto-config properties: "onClientErrors" and "onHttpCodes".
- Implement tests for retry auto-config properties.
- Generate missing license headers.