zed/crates/google_ai
Marshall Bowers cf5f4dddf5
Authorize access to language model providers based on country (#15859)
This PR updates the LLM service to authorize access to language model
providers based on the requester's country.

We detect the country using Cloudflare's
[`CF-IPCountry`](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry)
header.

The country code is then checked against the list of supported countries
for the given LLM provider. Countries that are not supported will
receive an `HTTP 451: Unavailable For Legal Reasons` response.

Release Notes:

- N/A
2024-08-06 11:49:04 -04:00
..
src Authorize access to language model providers based on country (#15859) 2024-08-06 11:49:04 -04:00
Cargo.toml Simplify LLM protocol (#15366) 2024-07-28 11:07:10 +02:00
LICENSE-GPL Fix licensing errors 2024-03-20 15:52:02 +01:00