opencode-detect-openai-compat

Detect OpenAI-compatible Anthropic proxies in OpenCode for correct caching.

113|8|Updated May 28, 2026
One-click install
npx skills add https://github.com/OnlyTerp/prompt-cache-skills --skill opencode-detect-openai-compat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode-detect-openai-compat
Source: https://github.com/OnlyTerp/prompt-cache-skills/tree/main/skills/opencode-detect-openai-compat
Command: npx skills add https://github.com/OnlyTerp/prompt-cache-skills --skill opencode-detect-openai-compat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of OpenCode's caching detection missing OpenAI-compatible proxies routing to Anthropic/Bedrock, improving cache hit rates for these routes.

Core Features & Use Cases

  • Enhanced Caching Detection: Detects OpenAI-compatible Anthropic proxies to ensure proper caching.
  • Target Harness: Designed for OpenCode.
  • Fix Implementation: Modifies the detection predicate in OpenCode's codebase to handle Anthropic-shaped models with OpenAI-compatible proxies.
  • Use Case: If you're using OpenCode and routing Anthropic-shaped models through an OpenAI-compatible proxy, this Skill ensures cache hits for these routes.

Quick Start

Apply the opencode-detect-openai-compat skill to your OpenCode setup to enable caching for OpenAI-compatible Anthropic proxies.

Frequently Asked Questions about opencode-detect-openai-compat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is OpenCode caching not working with my OpenAI-compatible Anthropic proxy?▼

OpenCode caching misses OpenAI-compatible Anthropic proxies because the detection predicate fails to route them correctly. This skill modifies the OpenCode codebase to identify these proxies and ensure proper cache hits.

How do I enable caching for Anthropic-shaped models routed through an OpenAI proxy in OpenCode?▼

Apply this skill to your OpenCode setup to modify caching detection. It updates the codebase detection predicate to identify OpenAI-compatible Anthropic proxies and route them to the correct caching path for cache hits.

Does this caching detection fix require modifying the OpenCode codebase?▼

Yes, this skill requires modifying the OpenCode codebase. It updates the detection predicate to handle Anthropic-shaped models with OpenAI-compatible proxies, ensuring they route to the correct caching path.

What is an OpenAI-compatible Anthropic proxy and why does it break cache detection?▼

An OpenAI-compatible Anthropic proxy routes Anthropic-shaped models via OpenAI protocols. OpenCode's caching detection misses this routing pattern, which this skill fixes by updating the detection predicate to ensure cache hits.

Can I use this proxy detection fix for OpenCode routes pointing to Bedrock?▼

Yes, this skill handles OpenCode routes pointing to Bedrock. It identifies OpenAI-compatible proxies routing to Anthropic or Bedrock and directs them to the correct caching path to improve cache hit rates.