fix: pass apiKey in provider options (ai-sdk does not read OPENAI_API_KEY)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
3b4eb6abc3
commit
7bf51d5489
1 changed files with 1 additions and 4 deletions
|
|
@ -94,10 +94,6 @@ def write_opencode_config(secrets: dict, role: str) -> None:
|
|||
|
||||
litellm_key = secrets.get("litellm-key", "")
|
||||
|
||||
# Set the LiteLLM API key as env var — opencode reads OPENAI_API_KEY for
|
||||
# openai-compatible providers
|
||||
os.environ["OPENAI_API_KEY"] = litellm_key
|
||||
|
||||
config = {
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "litellm/copilot/claude-sonnet-4.6",
|
||||
|
|
@ -107,6 +103,7 @@ def write_opencode_config(secrets: dict, role: str) -> None:
|
|||
"name": "LiteLLM",
|
||||
"options": {
|
||||
"baseURL": f"{LITELLM_BASE_URL}/v1",
|
||||
"apiKey": litellm_key,
|
||||
},
|
||||
"models": {
|
||||
"copilot/claude-sonnet-4.6": {"name": "copilot/claude-sonnet-4.6"},
|
||||
|
|
|
|||
Loading…
Reference in a new issue