Skip to content

Conversation

@mariamjabara
Copy link
Contributor

@mariamjabara mariamjabara commented Feb 3, 2026

What does this PR do?

Adds system prompt support for Trinity models (via OpenRouter) to address known behaviours with tool calling and the model looping. When the model id contains "trinity", we use a dedicated prompt: XML-only tool calls, exactly one tool per message, wait for the result before continuing, use the question tool when the request is vague, and avoid repeating the same tool with the same params. The prompt is a small change on top of the default prompt: same content except the "Tool usage policy" section is replaced with these Trinity rules. Routing is a single check in SystemPrompt.provider() in system.ts before the default branch.

Closes #12027

How did you verify your code works?

Locally added a system.test.ts file to 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.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Hey! Your PR title Add Trinity model system prompt support doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@mariamjabara mariamjabara changed the title Add Trinity model system prompt support feat: add Trinity model system prompt support Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 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 3, 2026

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

No duplicate PRs found

@mariamjabara mariamjabara marked this pull request as ready for review February 3, 2026 22:26
@rekram1-node rekram1-node merged commit 015cd40 into anomalyco:dev Feb 3, 2026
6 checks passed
rekram1-node added a commit that referenced this pull request Feb 3, 2026
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.

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

2 participants