Skip to content

Conversation

@Gardelll
Copy link

@Gardelll Gardelll commented Dec 6, 2025

Prefix compaction/summarize/title system instruction with PROMPT_ANTHROPIC_SPOOF to support proxied Anthropic provider.

…_ANTHROPIC_SPOOF to support proxied Anthropic provider.
@rekram1-node
Copy link
Collaborator

rekram1-node commented Dec 6, 2025

The anthropic spoof is there solely for coding max/pro plans, are you running opencode through a proxy to your max plan? Because you may not really want that spoof unless you're doing that

@Gardelll
Copy link
Author

Gardelll commented Dec 6, 2025

The anthropic spoof is there solely for coding max/pro plans, are you running opencode through a proxy to your max plan? Because you may not really want that spoof unless you're doing that

Yes, it sounds unsafe, but there is indeed such a need.

@rekram1-node rekram1-node changed the title Support proxied Anthropic provider for compaction/summarize/title task tweak: include anthropic spoof for providers including "anthropic" in name Dec 6, 2025
@rekram1-node
Copy link
Collaborator

I don't know if we should be including it all the time, for example: google-vertex-anthropic is a valid provider, no reason to attach it in that case

@rekram1-node
Copy link
Collaborator

that is the only provider I see this being an issue for, but fr? You have a proxy setup that uses claude code subscriptions?

@Gardelll
Copy link
Author

Gardelll commented Dec 6, 2025

I don't know if we should be including it all the time, for example: google-vertex-anthropic is a valid provider, no reason to attach it in that case

Maybe we should use another option to include this spoof for custom providers?

that is the only provider I see this being an issue for, but fr? You have a proxy setup that uses claude code subscriptions?

I am using a config like this to bypass regional restrictions:

"anthropic-proxy": {
  "npm": "@ai-sdk/anthropic",
  "name": "ProxiedClaudeCode",
  "options": {
    "baseURL": "https://proxied-claude-endpoint/v1",
    "headers": {
      // claude code cli headers
    }
  },
  "models": {
    // ...
  }
}

It is working fine but excludes title generation, etc.

@rekram1-node
Copy link
Collaborator

ig this is fine, should prolly just exclude the case I mentioned

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.

2 participants