Description
Description
We are currently trying to support Cohere's Command A model in our documentation chatbot. One necessary feature for go-live is citations - we need the LLM to return a list of URLs to the documents it used to generate its response. When using other models like Claude 3.5, we're able to get the model to consistently output URLs in its response with the system prompt, but Command A isn't as malleable in this way.
When working with the Cohere team, they recommended we use their native Citations feature, which involves turning on this flag (https://docs.cohere.com/v2/reference/chat-stream#request.body.citation_options) when streaming text, which will force the LLM to output a list of URLs after it's done responding. This flag is available when working with Cohere's SDK directly, but not when going through AI-SDK currently.
Was wondering if it would be possible to add support for this Cohere SDK Citations feature in AI-SDK to unblock us working with Cohere.
For additional context on their native Citations feature, here's another relevant page from their docs: https://docs.cohere.com/v2/docs/tool-use-citations#accurate-citations
AI SDK Version
ai - 4.3.16