Repository navigation
fix: 修复 insecure TLS 开关引入的 Rust 编译错误(E0599) - #38
Merged
NingNing0111 merged 2 commits intoSep 17, 2026
Merged
Conversation
rig 0.40 的 ClientBuilder::http_client 要求参数实现 HttpClientExt, 原生 reqwest::Client 不满足该约束导致 15 个 E0599 编译错误。 用官方 rig::http_client::ReqwestClient 包一层,底层仍是同一个 client,insecure 开关的 TLS 行为不变。
rig-core 0.40 depends on reqwest 0.13 while the app uses reqwest 0.12; HttpClientExt is only implemented for rig's 0.13 Client, so construct the client via rig::http_client::ReqwestClient::builder() instead of wrapping the app's 0.12 client (ReqwestClient is a type alias, not a wrapper).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#37 合并后 CI 的
Cargo check (Rust)挂了,15 个 E0599。根因
rig 0.40 的
ClientBuilder::http_client()要求参数实现HttpClientExttrait,但原生reqwest::Client没有该实现(实现只在官方包装类型rig::http_client::ReqwestClient上),导致.build()处 trait bound 不满足。改动(最小)
src-tauri/src/llm/service.rs:新增rig_http_client_for(),用rig::http_client::ReqwestClient::new(...)包一层;LlmService构建处改用它。src-tauri/src/command/llm_provider.rs:模型列表构建处改用rig_http_client_for()。底层仍是同一个 reqwest client,
insecure开关的 TLS 行为不变;fetch_openai_compatible_models用的原生 client 未动。