A registry is an immutable value, not a mutable global: withProvider and withModule return a new registry, and an application that wants a different set constructs one with ProviderRegistry.of and passes it in. Core code resolves a registry through a using clause, so the default is ProviderRegistry.default unless the caller supplies another.
Lookup is by ProviderId and never throws: an id nothing handles produces a Left naming the ids that are registered, which is the difference between a usable error and "provider openai not registered".
Folds an alias onto the id that owns it, leaving unknown strings alone.
Folds an alias onto the id that owns it, leaving unknown strings alone.
"google" becomes "gemini" because the Gemini descriptor declares that alias. An id no provider claims is returned canonicalised but unchanged — parsing config must not depend on what happens to be on the classpath; only resolution does.