Model listing and chat provider construction rewrite localhost to
host.docker.internal via config.DockerLocalhost() when running inside
Docker, but all three memory.NewOpenAIEmbeddingProvider call sites
(verify-embedding handler, runtime memory embedding) passed the raw
api_base through. In Docker the container resolved localhost to itself,
so Ollama Verify Embedding and runtime embedding failed with connection
refused while the model dropdown loaded fine.
Centralize the rewrite inside the constructor so no call site can miss
it, add a SetInDockerForTest hook for environment-independent regression
tests, and pin Docker detection off in httptest-based suites.
Fixes#1519
DockerLocalhost() now rewrites both localhost and 127.0.0.1 to
host.docker.internal. Ollama registerInMemory() defaults to
http://localhost:11434/v1 when APIBase is empty, matching startup code.
Closes#470. registerInMemory() skipped Ollama because APIKey was empty.
Add Ollama special case before the key guard (mirrors startup code).
When running in Docker, rewrite localhost → host.docker.internal so the
container can reach the host Ollama instance. Extract InDocker() and
DockerLocalhost() into config/runtime.go for reuse.
Add extra_hosts to docker-compose.yml for Linux compatibility.