CI / CI (pull_request) Failing after 39m45s
Bug 1: LLM_API_BASE=https://api.riotpiao.com/v1 + code appends /v1/embeddings = https://api.riotpiao.com/v1/v1/embeddings (404). Fix: strip trailing /v1 from base URL in from_env(). Bug 2: embeddings client sent 'apikey' custom header, but gateway expects 'Authorization: Bearer <token>'. Fix: use Authorization Bearer header. Caused: 'expected ident at line 1 column 2' error on /memory/query (gateway returned HTML/text error, client tried to parse as JSON).