Skip to content

feat: Trinity model support#12144

Draft
mariamjabara wants to merge 4 commits intoanomalyco:devfrom
mariamjabara:trinity-model-support
Draft

feat: Trinity model support#12144
mariamjabara wants to merge 4 commits intoanomalyco:devfrom
mariamjabara:trinity-model-support

Conversation

@mariamjabara
Copy link
Contributor

@mariamjabara mariamjabara commented Feb 4, 2026

What does this PR do?

Adds system prompt support for Trinity models (e.g. via OpenRouter). When the model id contains "trinity", we use a dedicated prompt that: uses exactly one tool per message, waits for the result before continuing, uses the question tool when the request is vague, and avoids repeating the same tool with the same params. The prompt is a small change on top of the default: same content except the “Tool usage policy” and “Doing tasks” sections are replaced with these Trinity rules. Routing is a single check in SystemPrompt.provider() in system.ts before the default branch.

Closes #12146

How did you verify your code works?

Added a local system.test.ts that checks the Trinity prompt is returned for arcee-ai/trinity-large-preview:free, arcee-ai/trinity-mini, and arcee-ai/trinity-mini:free; those tests passed. Also ran OpenCode in the terminal (TUI), selected arcee-ai/trinity-large-preview:free via OpenRouter, sent a message, and used temporary debug logging to confirm the model was detected and the Trinity prompt was selected. Internal testing was done with prompts designed to trigger the behaviors we wanted to avoid (e.g. parallel tool calls, repeating the same tool with the same params, etc). Model behaviour was on par with expectations.

mariamjabara and others added 2 commits February 3, 2026 17:06
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Tool-calling optimization for Trinity model family

1 participant