Add modelName and modelIdentifier fields to DuoWorkflow GraphQL type

What does this MR do and why?

Exposes two new fields on the DuoWorkflow GraphQL type that surface model information already stored in the model_metadata_json column on the duo_workflows_workflows table:

  • modelMetadataName — the GitLab model name (e.g. claude_sonnet_4_6_vertex)
  • modelMetadataIdentifier — the provider model string (e.g. vertex_ai/claude-sonnet-4-5@20250929)

The model_metadata_json column is already populated by the duo_workflow_service when saving checkpoints (via CreateCheckpointService). This change makes the data accessible via the GraphQL API so it can be displayed in the session details UI.

Both fields are marked as experiment (milestone 19.2) and nullable, consistent with the existing agentName field pattern.

References

How to set up and validate locally

  1. Set up Duo Agent Platform
  2. Run one or more flows (e.g. agentic chat, developer, fix pipeline)
  3. The identifier field is only populated for self-hosted models. If you trust me and don't want to bother setting up self-hosted models, skip to step 8
  4. Now, to populate the identifier field: switch GDK to self-managed mode.
  5. Go to your top-level Duo settings: Admin > Gitlab Duo > Configuration. Set your AI Gateway URL to http://gdk.test:5052, and your DAP service to gdk.test:50052
  6. Turn off Use TLS for the GitLab Duo Agent Platform service
  7. Set up a model under Gitlab Duo > Manage Models, and set it to be used for Agentic Chat. Now initiate a chat in your GDK
  8. Run the below GraphQL query:
query {
  duoWorkflowWorkflows {
    nodes {
      id
      modelMetadataName
      modelMetadataIdentifier
    }
  }
}

Or for a specific workflow:

query {
  duoWorkflowWorkflows(workflowId: "gid://gitlab/Ai::DuoWorkflows::Workflow/123") {
    nodes {
      id
      modelMetadataName
      modelMetadataIdentifier
    }
  }
}

The fields return null when no model metadata has been recorded for the session (e.g. older sessions created before the model_metadata_json column was added), and return the model name/identifier once the workflow service has saved a checkpoint with model metadata.

Local testing:

GraphQL_explorer

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Roman Eisner

Merge request reports

Loading
Loading