Hey Team, it looks like there is no integration te...
# koog-agentic-framework
d
Hey Team, it looks like there is no integration tests for the MistalAI client. Would this be possible for the Koog team to set up the infrastructure necessary and I could write the integration tests. Currently the support for tools with Mistral is broken since 6.x. I haven't had time to even create a ticket. I will do that today with a reproducer. But if we don't have integration tests, this will be worthless as nothing will prevent further regressions in the future.
After looking further in the repo, it seems we have integration tests for Mistral (https://github.com/JetBrains/koog/blob/develop/integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/utils/Models.kt#L51). The error I am hitting is https://youtrack.jetbrains.com/issue/KG-535/Error-while-parsing-OpenAI-like-content-when-the-content-is-json-array-but-not-parts opened by @Maria Tigina 4 months ago! 😛 I created a reproducer (https://github.com/ptitjes/koog-reproducers/tree/main/mistral-tool-results) where I added a simple web search tool to kinda force Mistral to use references. (It is not deterministic though, so you might need to launch the test multiple times to hit the bug.)
v
cc @Maria Tigina could you please take a look 🙏
d
I though about fixing it. I created a test case with the Json returned by the Mistral API, in this branch: https://github.com/ptitjes/koog/tree/p/KG-535-mistral-ai-references But fixing it would require creating the class hierarchy described in the Mistlal API and that seems to completely differ from what in the OpenAI API (but I don't know it very well). I was wondering if, given that Mistral publishes an OpenAPI spec, we should not rely on https://github.com/nomisRev/OpenAPI-kt to generate code at build or any other generator. This would allow us to only have to maintain the glue and be sure to always be up-to-date with the API. Otherwise, we would have to maintain both the object model and the glue.