OpenHands / OpenHands/extensions

[Bug]: repo-monitor ignores AUTOMATION_MODEL profile

Open Beginner friendly
#605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
148
Forks
90
Avg merge
1d 17h
Merged PRs (30d)
36

Description

Bug Description

skills/github-repo-monitor/scripts/main.py builds its conversation payload from the agent server's active profile and never reads AUTOMATION_MODEL, so a repo-monitor automation runs on whatever profile is active in the UI instead of its configured one. (Same bug as #428, which has no type label so the readiness bot cannot evaluate it; the maintainer narrowed the remaining scope to repo-monitor in #428.)

Actual Behavior

Reproducible without any server:

python -m pytest tests/test_github_repo_monitor.py -q -k profile_resolves
# fails on main: no request to /api/profiles/<AUTOMATION_MODEL> is ever made,
# the active profile's llm is forwarded unchanged

With AUTOMATION_MODEL=gpt-5.6-sol set, _get_agent_dict returns the active profile's llm (openai/gpt-5.5) instead of the configured profile.

Expected Behavior

When AUTOMATION_MODEL is set, resolve that profile via GET /api/profiles/{name} (plaintext secrets) and forward its config with usage_id: profile:<name>; fall back to the active profile when unset or on 404.

Acceptance Criteria
  • AUTOMATION_MODEL set + profile exists → forwarded llm is the profile config with usage_id: profile:<name>.
  • AUTOMATION_MODEL set + profile 404 → falls back to the active profile.
  • AUTOMATION_MODEL unset → active profile, no profile request.
  • New tests/test_github_repo_monitor.py passes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with skills/github-repo-monitor/scripts/main.py, especially _get_agent_dict, and run python -m pytest tests/test_github_repo_monitor.py -q -k profile_resolves. Verify the configured AUTOMATION_MODEL profile is requested and forwarded with its usage_id, while unset or 404 cases retain the active profile behavior; then run the full named test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.