Use reqwest 0.12 with rustls-tls and add timeouts

Also improve review prompt with line calculation instructions, switch
feedback to French, and enable reasoning for OpenRouter.
This commit is contained in:
2026-06-03 20:51:21 +00:00
parent de81232201
commit cd5c5b9478
7 changed files with 46 additions and 446 deletions
+6
View File
@@ -7,9 +7,11 @@ pub struct EnvConfig {
pub webhook_secret: String,
pub open_router_api_key: String,
pub open_router_model: String,
pub open_router_timeout: u64,
pub bot_name: String,
pub gitea_url: String,
pub gitea_token: String,
pub gitea_timeout: u64,
}
pub fn load_config() -> anyhow::Result<EnvConfig> {
@@ -20,8 +22,10 @@ pub fn load_config() -> anyhow::Result<EnvConfig> {
let webhook_secret = try_get_env("WEBHOOK_SIG_HEADER_SECRET")?;
let open_router_api_key = try_get_env("OPEN_ROUTER_API_KEY")?;
let open_router_model = try_get_env("OPEN_ROUTER_MODEL")?;
let open_router_timeout = try_get_env("OPEN_ROUTER_TIMEOUT")?.parse()?;
let gitea_url = try_get_env("GITEA_URL")?;
let gitea_token = try_get_env("GITEA_TOKEN")?;
let gitea_timeout = try_get_env("GITEA_TIMEOUT")?.parse()?;
Ok(EnvConfig {
http_port,
@@ -29,8 +33,10 @@ pub fn load_config() -> anyhow::Result<EnvConfig> {
bot_name,
open_router_api_key,
open_router_model,
open_router_timeout,
gitea_url,
gitea_token,
gitea_timeout,
})
}