Skip to content

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Sep 23, 2025

This PR adds comprehensive robustness testing for Azure OpenAI embeddings and Google GenAI runtime hints registration, focusing on null safety, configuration edge cases, and proper hint type isolation.

Changes Made

Azure OpenAI Embedding Tests

Null Safety Validation

  • shouldHandleNullInputList - Verifies graceful handling of null input lists
  • shouldHandleNullEmbeddingRequest - Ensures proper exception handling for null requests

Configuration Testing

  • shouldHandlePartialOptionsOverride - Tests mixing custom options with defaults
  • shouldHandleDefaultOptionsOnlyClient - Validates minimal configuration scenarios

Google GenAI Runtime Hints Tests

ClassLoader Robustness

  • registerHintsWithNullClassLoader - Ensures hints registration works with null ClassLoader

Hint Type Isolation

  • verifyNoProxyHintsAreRegistered - Confirms only reflection hints are registered
  • verifyNoSerializationHintsAreRegistered - Validates clean hint scope without serialization hints

Benefits

  • Prevents NullPointerException crashes in production environments
  • Ensures robust configuration handling with partial option overrides
  • Validates proper fallback to default configurations
  • Confirms correct hint registration for native compilation
  • Prevents hint bloat by validating only necessary hint types are registered
  • Ensures ClassLoader independence for flexible deployment scenarios

…AI embeddings and Google GenAI runtime hints

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
@ilayaperumalg ilayaperumalg self-assigned this Sep 24, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.0.M3 milestone Sep 24, 2025
@ilayaperumalg
Copy link
Member

@alxkm Thanks for the PR and @sunyuhan1998 Thanks for the review.

@ilayaperumalg ilayaperumalg merged commit 53eaf9a into spring-projects:main Sep 24, 2025
2 checks passed
Willam2004 pushed a commit to Willam2004/spring-ai that referenced this pull request Oct 11, 2025
…AI embeddings and Google GenAI runtime hints (spring-projects#4456)

Signed-off-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: 家娃 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants