[PR #1284] [MERGED] Check if modelID includes "claude" for antropic/claude prompt caching #9875

Closed
opened 2026-02-16 18:14:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1284
Author: @jessevdp
Created: 7/24/2025
Status: Merged
Merged: 7/24/2025
Merged by: @thdxr

Base: devHead: better-claude-prompt-caching-detection


📝 Commits (1)

  • 026732e also detect antropic/claude models by checking if modelID includes "claude"

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/opencode/src/provider/transform.ts (+1 -1)

📄 Description

Not all providers explictly add "anthropic" in the model ID. GCP Vertext for example. See the model IDs listed here: https://docs.anthropic.com/en/docs/about-claude/models/overview


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1284 **Author:** [@jessevdp](https://github.com/jessevdp) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `better-claude-prompt-caching-detection` --- ### 📝 Commits (1) - [`026732e`](https://github.com/anomalyco/opencode/commit/026732e41bd6cd9467349df1eabb64c8fbbc5e74) also detect antropic/claude models by checking if modelID includes "claude" ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/provider/transform.ts` (+1 -1) </details> ### 📄 Description Not all providers explictly add "anthropic" in the model ID. GCP Vertext for example. See the model IDs listed here: https://docs.anthropic.com/en/docs/about-claude/models/overview --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:19 -05:00
yindo closed this issue 2026-02-16 18:14:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9875