forked from ai-tools/app-opencode
introduce separate weave-proxy service which holds the API key
This prevents opencode from having access to the `WEAVE_API_KEY` enviroment variable.
This commit is contained in:
11
config/nginx/templates/default.conf.template
Normal file
11
config/nginx/templates/default.conf.template
Normal file
@@ -0,0 +1,11 @@
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_pass https://weave.redpencil.io;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_set_header Host weave.redpencil.io;
|
||||
proxy_set_header Authorization "Bearer ${WEAVE_API_KEY}";
|
||||
proxy_buffering off; # SSE streaming
|
||||
proxy_read_timeout 600s; # match opencode's 5-min defaults
|
||||
}
|
||||
}
|
||||
@@ -34,8 +34,8 @@
|
||||
"weave": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"options": {
|
||||
"baseURL": "https://weave.redpencil.io/v1",
|
||||
"apiKey": "{env:WEAVE_API_KEY}"
|
||||
"baseURL": "http://weave-proxy/v1",
|
||||
"apiKey": "not-needed"
|
||||
},
|
||||
"models": {
|
||||
"kimi-K2.7-code": {
|
||||
|
||||
Reference in New Issue
Block a user