language_models: Rename handler to handle in Bedrock provider (#34923)

This PR renames the `handler` field to `handle` on the
`BedrockLanguageModelProvider` and `BedrockModel` structs.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-07-22 16:04:08 -04:00 committed by GitHub
parent f3c332d839
commit 7f70325a93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -243,7 +243,7 @@ impl State {
pub struct BedrockLanguageModelProvider { pub struct BedrockLanguageModelProvider {
http_client: AwsHttpClient, http_client: AwsHttpClient,
handler: tokio::runtime::Handle, handle: tokio::runtime::Handle,
state: gpui::Entity<State>, state: gpui::Entity<State>,
} }
@ -260,7 +260,7 @@ impl BedrockLanguageModelProvider {
Self { Self {
http_client: AwsHttpClient::new(http_client.clone()), http_client: AwsHttpClient::new(http_client.clone()),
handler: Tokio::handle(cx), handle: Tokio::handle(cx),
state, state,
} }
} }
@ -270,7 +270,7 @@ impl BedrockLanguageModelProvider {
id: LanguageModelId::from(model.id().to_string()), id: LanguageModelId::from(model.id().to_string()),
model, model,
http_client: self.http_client.clone(), http_client: self.http_client.clone(),
handler: self.handler.clone(), handle: self.handle.clone(),
state: self.state.clone(), state: self.state.clone(),
client: OnceCell::new(), client: OnceCell::new(),
request_limiter: RateLimiter::new(4), request_limiter: RateLimiter::new(4),
@ -371,7 +371,7 @@ struct BedrockModel {
id: LanguageModelId, id: LanguageModelId,
model: Model, model: Model,
http_client: AwsHttpClient, http_client: AwsHttpClient,
handler: tokio::runtime::Handle, handle: tokio::runtime::Handle,
client: OnceCell<BedrockClient>, client: OnceCell<BedrockClient>,
state: gpui::Entity<State>, state: gpui::Entity<State>,
request_limiter: RateLimiter, request_limiter: RateLimiter,
@ -443,7 +443,7 @@ impl BedrockModel {
} }
} }
let config = self.handler.block_on(config_builder.load()); let config = self.handle.block_on(config_builder.load());
anyhow::Ok(BedrockClient::new(&config)) anyhow::Ok(BedrockClient::new(&config))
}) })
.context("initializing Bedrock client")?; .context("initializing Bedrock client")?;