GitLab stations ignore the automation's agent profile on a local Agent Server

Abierto Apto para principiantes
#969 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Empieza leyendo skills/gitlab-issue-to-mr/scripts/main.py y skills/gitlab-mr-reviewer/scripts/common.py; después, compara la configuración local de la conversación con agent_conversation.py de las estaciones de GitHub y con la ruta en la nube. Comprueba cómo se pasa AUTOMATION_AGENT_PROFILE_ID al Agent Server. El trabajo estará terminado cuando las tres estaciones de GitLab afectadas usen el perfil seleccionado si está configurado y mantengan el comportamiento actual cuando no haya ninguno.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happens

On a local Agent Canvas, I created the three GitLab stations with an agent profile that uses Claude Code over ACP. When gitlab-issue-to-mr picks up a labelled issue, the conversation starts with the default Agent and the model from Settings → LLM, not the selected profile. With no API key there, the run fails on its first message:

litellm.AuthenticationError: AuthenticationError: OpenAIException - ... Incorrect API key provided: None.

This is the local counterpart of #848, which fixed the same problem on OpenHands Cloud and Enterprise.

Cause

On the local path, create_conversation() in skills/gitlab-issue-to-mr/scripts/main.py builds {"kind": "Agent", "llm": <settings LLM>} and never reads AUTOMATION_AGENT_PROFILE_ID. Only the cloud path passes agent_profile_id.

_start_conversation() in skills/gitlab-mr-reviewer/scripts/common.py has the same pattern, so gitlab-mr-reviewer and gitlab-prd-refiner are affected too.

The automation service sets AUTOMATION_AGENT_PROFILE_ID for local runs as well, and the Agent Server accepts agent_profile_id when it starts a conversation. The GitHub stations already use it locally through agent_conversation.py.

Proposed fix

When AUTOMATION_AGENT_PROFILE_ID is set, send agent_profile_id instead of a hand-built agent. Without a profile, keep the current behaviour.

Related

github-agents-md-maintainer and github-repo-monitor use the same pattern on the local path. I'd leave them for a follow-up so this fix stays focused on GitLab.

Environment

Local Agent Canvas (Docker), openhands-agent-server 1.62.0, extensions main at cfd1d0f.

Lenguaje dominante
Python
Estrellas
184
Forks
137
Merge medio
1 d 16 h
PR fusionados (30 d)
60

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenHands/extensions

Todos los issues de OpenHands/extensions

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.