diff --git a/container/entrypoint.py b/container/entrypoint.py index b5394ea..172c61f 100644 --- a/container/entrypoint.py +++ b/container/entrypoint.py @@ -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"},