Skip to content

feat(agents): per-agent model assignment for 9 quality-gate agents#2

Merged
diegosouzapw merged 2 commits into
mainfrom
feat/omniroute-pr2-per-agent-model
May 25, 2026
Merged

feat(agents): per-agent model assignment for 9 quality-gate agents#2
diegosouzapw merged 2 commits into
mainfrom
feat/omniroute-pr2-per-agent-model

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Specializes 9 quality-gate and decision agents to use omniroute/claude-opus-4-7 via frontmatter model: directive. The remaining 69 agents in agents/ are untouched. Without OmniRoute configured (PR-1 not applied), OpenCode CLI falls back to the global default — no crash.

Scope adjustment from the original plan

The original _tasks/pr-2-per-agent-model/ plan called for "5 reviewers + 4 orientadores" from the academic "banca" pipeline. Investigation showed the banca is documented only textually in criador-artigo/banca/*.md (SIMULADOR_BANCA.md, ORIENTADORES_PESQUISA.md), not as OpenCode agent files. The 49 MASWOS agents in criador-artigo/agents/ exist as descriptive markdown but do not use OpenCode frontmatter.

The closest functional analogues in agents/ (the OpenCode agent registry) are:

Reviewers (quality gate) — 5:

  • agents/code-reviewer.md
  • agents/reviewer.md
  • agents/reversa-reviewer.md
  • agents/ws-reviewer.md
  • agents/security-auditor.md

Architects/orientadores (decision) — 4:

  • agents/architect.md
  • agents/architecture-analyzer.md
  • agents/adr-manager.md
  • agents/contract-manager.md

What changes

Path Type Change
agents/*.md (9 files) modified +1 line each: model: omniroute/claude-opus-4-7
references/omniroute-model-mapping.md new canonical mapping table + fallback ladder + free-tier preservation
CONTRIBUTING.md modified new section "Especializando o modelo de um agente (opcional)"

Total: +133 line insertions, 0 deletions.

Frontmatter handling

5 of the 9 agents do not declare a name: field. For those, the model: line is inserted as the first line of the frontmatter body. For the 4 that have name:, the model: line is inserted immediately after it. All 9 frontmatters validated with PyYAML.

Safety

  • If OmniRoute is not configured: OpenCode CLI silently falls back to the global default. No crash.
  • Other 69 agents untouched.
  • reversa-* agents that already had their own model: (big-pickle) preserved.

Related

  • PR-1 (prerequisite, merged in fork): chore(config): add OmniRoute as optional alternative provider
  • PR-3 (next, independent): feat(plugin): ecosystem-sync v3.6 with OmniRoute health awareness
  • Full plan: _tasks/00-PLAN-OMNIROUTE-INTEGRATION.md

Rollback

git revert <commit-sha> cleanly reverts all 9 agents to the default model.

…hitects

Adds 'model: omniroute/claude-opus-4-7' frontmatter to nine quality-gate
and decision agents. Original plan called for 'banca + orientadores'
academic-review agents (5 reviewers + 4 PhD orientadores) but those exist
only as textual descriptions in criador-artigo/banca/*.md, not as OpenCode
agent files. Adjusted scope to the closest functional analogues in
agents/:

Reviewers (5):
  code-reviewer, reviewer, reversa-reviewer, ws-reviewer, security-auditor

Architects/decisions (4):
  architect, architecture-analyzer, adr-manager, contract-manager

Each file got a single line added immediately inside the frontmatter
(after the opening --- for files without a 'name:' field, or after 'name:'
when present). YAML frontmatter is preserved and parseable. Without
OmniRoute configured (PR-1 not applied), OpenCode CLI falls back to the
global default (opencode/big-pickle) — no crash.
- references/omniroute-model-mapping.md: canonical table of agent
  categories -> recommended OmniRoute models, fallback ladder, free-tier
  preservation strategy, and explicit list of the 9 files specialized
  by this PR.
- CONTRIBUTING.md: new section 'Especializando o modelo de um agente
  (opcional)' documenting the model: frontmatter convention, when to use
  it, fallback behavior, and PR checklist.
@diegosouzapw diegosouzapw merged commit 241054e into main May 25, 2026
1 check passed
@diegosouzapw diegosouzapw deleted the feat/omniroute-pr2-per-agent-model branch May 25, 2026 22:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces per-agent model specialization using OmniRoute, updating several agent configuration files to use omniroute/claude-opus-4-7 and adding a model mapping reference guide alongside updated contribution guidelines. The review feedback highlights a mismatch in the PR title referenced in CONTRIBUTING.md (with a suggestion to use generic phrasing) and points out contradictions in several agent files where existing HTML comments still reference the old big-pickle model.

Comment thread CONTRIBUTING.md

## Especializando o modelo de um agente (opcional)

A partir do PR `feat(agents): per-agent model assignment for review panel + orientadores`, agentes podem declarar um modelo específico via frontmatter YAML, sobrepondo o default global de `opencode.json`. **Não é obrigatório**: agentes sem `model:` herdam o default do ecossistema.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PR title referenced here (feat(agents): per-agent model assignment for review panel + orientadores) does not match the actual PR title (feat(agents): per-agent model assignment for 9 quality-gate agents). Consider using a more generic phrasing to describe the feature rather than referencing a specific PR name, which might change or become outdated.

Suggested change
A partir do PR `feat(agents): per-agent model assignment for review panel + orientadores`, agentes podem declarar um modelo específico via frontmatter YAML, sobrepondo o default global de `opencode.json`. **Não é obrigatório**: agentes sem `model:` herdam o default do ecossistema.
A partir da especialização de modelos por agente, estes podem declarar um modelo específico via frontmatter YAML, sobrepondo o default global de opencode.json. **Não é obrigatório**: agentes sem a diretiva model herdam o default do ecossistema.

Comment thread agents/adr-manager.md

---
name: ADRManager
model: omniroute/claude-opus-4-7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The newly added model: omniroute/claude-opus-4-7 in the frontmatter contradicts the existing HTML comment on line 5, which states Modelo: big-pickle (OpenCode Zen, 200K ctx, 128K out, gratuito). Consider updating or removing the outdated model reference in the header comment to maintain consistency.

Comment thread agents/architect.md
-->

---
model: omniroute/claude-opus-4-7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The newly added model: omniroute/claude-opus-4-7 in the frontmatter contradicts the existing HTML comment on line 5, which states Modelo: big-pickle (OpenCode Zen, 200K ctx, 128K out, gratuito). Consider updating or removing the outdated model reference in the header comment to maintain consistency.

Comment thread agents/code-reviewer.md
-->

---
model: omniroute/claude-opus-4-7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The newly added model: omniroute/claude-opus-4-7 in the frontmatter contradicts the existing HTML comment on line 5, which states Modelo: big-pickle (OpenCode Zen, 200K ctx, 128K out, gratuito). Consider updating or removing the outdated model reference in the header comment to maintain consistency.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant