Discourse AI plugin update breaks Azure AI compatibility

After upgrading Discourse AI plugin to the latest version, GPT models with Azure AI stopped working, logs showed that:

DiscourseAi::Completions::Endpoints::OpenAi: status: 400 - body: {
  "error": {
    "message": "Unknown parameter: 'stream_options'.",
    "type": "invalid_request_error",
    "param": "stream_options",
    "code": "unknown_parameter"
  }
}

The latest Azure AI api definition could be found on GitHub. And stream_options hasn’t been there yet.

2 Likes

Thanks for letting us know. I fixed it here:

2 Likes

Hi! I updated the plugin and it works on Azure AI now. However, I found a new problem that the plugin seems to be using the endpoint configured for gpt-4 instead of gpt-4o. :face_with_hand_over_mouth:

The site setting of gpt-4o is only read at has_url?(model) function, but not used in the actual model_uri function.

Thank you for your time fixing this :sparkling_heart:

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.