Skip to content

Conversation

@aptdnfapt
Copy link

Summary

  • Add pipe (|) and colon (:) as provider/model separators in parseModel , as | is not been used on any model id from any provider
  • Fix YAML frontmatter to strip trailing newlines for values with colons

Details
Fixes #8896

The parseModel function now supports three separator formats (in priority
order):

  1. Pipe | - unambiguous, no model IDs use it (e.g. openrouter|anthropic/ claude-3-opus)
  2. Colon : - if it appears before any slash (e.g. openrouter:anthropic/ claude-3-opus)
  3. Slash / - default fallback (e.g. openrouter/anthropic/claude-3-opus)

Also fixed YAML frontmatter parsing in .opencode/agent/*.md files where
model values containing colons were getting a trailing newline (using |-
instead of | for block scalars).

Testing

  • Added tests for all separator formats
  • Tested with complex model IDs like synthetic/hf:zai-org/GLM-4.7 and
    amazon-bedrock/amazon.titan-text-express-v1:0:8k

- Add pipe (|) and colon (:) as provider/model separators in parseModel
- Pipe has highest priority, then colon (if before slash), then slash
- Fix YAML frontmatter to use |- instead of | to strip trailing newlines
- Fixes subagent model config with complex model IDs (e.g. openrouter:anthropic/claude-3-opus)
@github-actions
Copy link
Contributor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subagent provider/id parser is dead ? provider/model not found on subagent

1 participant