Bug description
Spring AI 2.0.0-M5 fails when using OpenAI-compatible embedding APIs (e.g. IONOS bge-m3) due to a mismatch in embedding response format.
The error indicates that the embedding is returned as a string (likely Base64) instead of a float[], which causes deserialization to fail:
json: cannot unmarshal string into Go struct field Embedding.data.embedding of type []float32
This worked correctly in 2.0.0-M4.
Environment
- Spring AI:
2.0.0-M5
- Java: 21
- Spring Boot: 4.0.6
- Vector Store: Qdrant
- Dependencies:
spring-ai-starter-model-openai
spring-ai-qdrant-store
spring-ai-rag
- Provider: IONOS OpenAI-compatible endpoint
- Model:
bge-m3
Steps to reproduce
- Configure Spring AI with an OpenAI-compatible endpoint (e.g. IONOS)
- Use
spring-ai-starter-model-openai
- Call embeddings
Bug description
Spring AI
2.0.0-M5fails when using OpenAI-compatible embedding APIs (e.g. IONOS bge-m3) due to a mismatch in embedding response format.The error indicates that the embedding is returned as a string (likely Base64) instead of a
float[], which causes deserialization to fail:json: cannot unmarshal string into Go struct field Embedding.data.embedding of type []float32
This worked correctly in
2.0.0-M4.Environment
2.0.0-M5spring-ai-starter-model-openaispring-ai-qdrant-storespring-ai-ragbge-m3Steps to reproduce
spring-ai-starter-model-openai