/summarize_comments command fails with M3003 error in self-hosted Duo Chat with Mistral model when comments are in French

Summary

The /summarize_comments command in Duo Chat fails with error code M3003 when used in self-hosted GitLab with self-hosted models. The error occurs for all users regardless of their permission level (admin, owner, regular users).

Environment

  • GitLab version: 18.4.2 self-hosted
  • AI Gateway version: 18.4.2
  • LLM: Mistral-small-3-1-24b-instruct-2503
  • Duo Chat type: Classical Duo Chat (not overlay)

Steps to reproduce

  1. Set up self-hosted GitLab 18.4.2 with AI Gateway 18.4.2
  2. Configure Mistral-small-3-1-24b-instruct-2503 as the LLM
  3. Open any issue in classical Duo Chat
  4. Use the /summarize_comments command

Logs

llm.log
{"severity":"INFO","time":"2025-12-11T16:02:10.687Z","correlation_id":"01KC72C0J2P2CQWFBJ00144GMA","meta.caller_id":"GraphqlController#execute","meta.feature_category":"team_planning","meta.organization_id":1,"meta.remote_ip":"77.248.251.114","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","user_id":1,"message":"Received AiAction mutation GraphQL query","class":"Mutations::Ai::Action","ai_event_name":"ai_action_mutation","ai_component":"abstraction_layer"}
{"severity":"INFO","time":"2025-12-11T16:02:10.772Z","correlation_id":"01KC72C0J2P2CQWFBJ00144GMA","meta.caller_id":"GraphqlController#execute","meta.feature_category":"team_planning","meta.organization_id":1,"meta.remote_ip":"77.248.251.114","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","user_id":1,"resource_id":1,"resource_class":"User","request_id":"7cbc0b3b-ba2b-4c86-a989-152023aedadd","action_name":"chat","options":{"client_subscription_id":"ab3b6bd8-aa87-45c6-8a3c-56278a177a12","project_id":"gid://gitlab/Project/1","content":"/summarize_comments","referer_url":"https://sr-env-e1efefb3-omnibus.env-e1efefb3.gcp.gitlabsandbox.net/ei-test-documentation-bugs-and-hallucinations/test-project/-/issues/2","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36","x_gitlab_client_type":"web_browser","x_gitlab_client_version":null,"x_gitlab_client_name":null,"x_gitlab_interface":"duo_chat","thread":{"id":69,"user_id":1,"organization_id":1,"last_updated_at":"2025-12-11T16:02:10.761Z","created_at":"2025-12-11T16:02:10.693Z","updated_at":"2025-12-11T16:02:10.693Z","conversation_type":"duo_chat"},"started_at":1765468930.6813376,"start_time":103995.169654842},"message":"Enqueuing CompletionWorker","class":"Llm::ChatService","ai_event_name":"worker_enqueued","ai_component":"abstraction_layer"}
{"severity":"INFO","time":"2025-12-11T16:02:11.056Z","correlation_id":"01KC72C0J2P2CQWFBJ00144GMA","meta.caller_id":"Llm::CompletionWorker","meta.feature_category":"ai_abstraction_layer","meta.organization_id":1,"meta.remote_ip":"77.248.251.114","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","meta.root_caller_id":"GraphqlController#execute","allowed":false,"message":"Supported Issuable Typees Ability Allowed","class":"Gitlab::Llm::Chain::Tools::SummarizeComments::Executor","ai_event_name":"permission","ai_component":"feature"}
{"severity":"INFO","time":"2025-12-11T16:02:11.056Z","correlation_id":"01KC72C0J2P2CQWFBJ00144GMA","meta.caller_id":"Llm::CompletionWorker","meta.feature_category":"ai_abstraction_layer","meta.organization_id":1,"meta.remote_ip":"77.248.251.114","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","meta.root_caller_id":"GraphqlController#execute","ai_error_code":"M3004","message":"No access to Duo Chat","class":"Gitlab::Llm::Chain::Tools::SummarizeComments::Executor","ai_event_name":"permission_denied","ai_component":"abstraction_layer"}
{"severity":"ERROR","time":"2025-12-11T16:02:11.057Z","correlation_id":"01KC72C0J2P2CQWFBJ00144GMA","meta.caller_id":"Llm::CompletionWorker","meta.feature_category":"ai_abstraction_layer","meta.organization_id":1,"meta.remote_ip":"77.248.251.114","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","meta.root_caller_id":"GraphqlController#execute","error":"I'm sorry, I can't generate a response. You might want to try again. You could also be getting this error because the items you're asking about either don't exist, you don't have access to them, or your session has expired.","duo_chat_error_code":"M3003","source":"unknown","message":"Error","class":"Gitlab::Llm::Chain::Answer","ai_event_name":"error_returned","ai_component":"duo_chat"}

image

Actual behavior

The command fails with the following error message:

I'm sorry, I can't generate a response. You might want to try again. You could also be getting this error because the items you're asking about either don't exist, you don't have access to them, or your session has expired. Error code: M3003

Expected behavior

The /summarize_comments command should successfully summarize the comments in the issue.

Impact

  • All users are affected (admin, owner, regular users)
  • The feature is completely non-functional in this configuration

Additional context

This issue occurs specifically with self-hosted models and may be related to how the command handles permissions or data retrieval in self-hosted environments.

Edited by Kate Grechishkina