feat: API-Schlüssel für strata aus Umgebungsvariable

strata verlangt nach dem Start mit --access lan einen Schlüssel (HTTP 401).
Der Client liest ihn aus der Umgebungsvariable STRATA_API_KEY (Name in
config.toml änderbar) und sendet ihn als Bearer-Token. Der Schlüssel steht
weder in der Konfiguration noch im Repo.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 21:13:26 +01:00
parent f35b68ae1f
commit dce98d3d11
4 changed files with 17 additions and 7 deletions

View File

@ -75,6 +75,7 @@ async fn start_batch(
runtime: cfg.container_runtime.clone(),
backend: cfg.backend.clone(),
endpoint_url: cfg.endpoint_url(),
api_key: std::env::var(&cfg.openai_api_key_env).ok().filter(|k| !k.is_empty()),
data_dir: paths.0.data_dir.clone(),
limits: cfg.sandbox_limits(),
};