yes make ur own local proxy.. then add it as openai compactiable in 9router
trick is headers must have useragent that opencode uses
its something like
UA = "opencode/1.18.23"
its exact value working as of now. claude code made me proxy
header value: "User-Agent": UA
enjoy.
full example of headers:
"def _headers(key, stream):
4
u/NinjaAlaska 1d ago edited 1d ago
yes make ur own local proxy.. then add it as openai compactiable in 9router
trick is headers must have useragent that opencode uses
its something like
UA = "opencode/1.18.23"
its exact value working as of now. claude code made me proxy
header value: "User-Agent": UA
enjoy.
full example of headers:
"def _headers(key, stream):
return {"Content-Type": "application/json", "Authorization": "Bearer " + key,
"User-Agent": UA,
"Accept": "text/event-stream" if stream else "application/json"}
here is full code https://github.com/akwin1234/opencode-local-proxy-muse-v1.2-contributor
https://www.reddit.com/r/opencode/comments/1w35v0r/code_unable_to_use_musespark12contributor_to/