the PR content:
- add observability to minimax chat model
- add observability to minimax embedding model
- fix chat model web search tools
- add related unit tests
related issue: https://github.com/spring-projects/spring-ai/issues/1432 https://github.com/spring-projects/spring-ai/issues/1433
Comment From: markpollack
:bow: Great stuff. All the tests passed but this one, which I didn't want to wait on to resolve as it can be investigagted later, it is a wrong value of some kind.
java.lang.AssertionError: Observation should have a high cardinality tag with key <gen_ai.usage.total_tokens> and value <16>. The key is correct but the value is <8>
at org.springframework.ai.minimax.embedding.MiniMaxEmbeddingModelObservationIT.observationForEmbeddingOperation(MiniMaxEmbeddingModelObservationIT.java:84)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Comment From: markpollack
merged in ee7d2b25567fbb72d1ca891e16c5864842024548
Comment From: mxsl-gr
🙇 Great stuff. All the tests passed but this one, which I didn't want to wait on to resolve as it can be investigagted later, it is a wrong value of some kind.
```
java.lang.AssertionError: Observation should have a high cardinality tag with key
and value <16>. The key is correct but the value is <8> at org.springframework.ai.minimax.embedding.MiniMaxEmbeddingModelObservationIT.observationForEmbeddingOperation(MiniMaxEmbeddingModelObservationIT.java:84) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ```
I think this related to the Spring context isolation in unit testing. I fixed this issue by the way in PR https://github.com/spring-projects/spring-ai/pull/1510