CodeWhale icon indicating copy to clipboard operation
CodeWhale copied to clipboard

Incorrect environment variable name in system prompt during HTTP connection

Open yuanshi76 opened this issue 6 months ago • 2 comments

When using http connection, the error "Error Failed to send message: Refusing insecure base URL 'http://XXXX'. Use HTTPS or set DEEPSEEKALLOWINSECURE_HTTP=1 to override for trusted environments." appears, but the actual environment variable name is "DEEPSEEK_ALLOW_INSECURE_HTTP=1"

yuanshi76 avatar May 08 '26 03:05 yuanshi76

Hey, I’d like to try working on this issue.

From the report, it looks like the HTTP connection error message shows the wrong environment variable name: DEEPSEEKALLOWINSECURE_HTTP=1, while the actual supported variable is DEEPSEEK_ALLOW_INSECURE_HTTP=1.

My plan is to:

  1. Search the codebase for the incorrect variable name/message.
  2. Update the system prompt or error text to use DEEPSEEK_ALLOW_INSECURE_HTTP=1.
  3. Check if there are any related docs/examples that also need the same correction.
  4. Open a small focused PR with only this fix.

Please let me know if this approach sounds correct before I open the PR.

@Hmbown

ashish200729 avatar May 08 '26 04:05 ashish200729

I checked the current source: crates/tui/src/client.rs:140 defines const ALLOW_INSECURE_HTTP_ENV: &str = "DEEPSEEK_ALLOW_INSECURE_HTTP", and the format string at line 349 uses that const directly via {}, so the displayed message should already say DEEPSEEK_ALLOW_INSECURE_HTTP=1 correctly. Looks like this was a transient bug on an older release. Closing — please reopen with the exact error text if you can repro on v0.8.24+.

Hmbown avatar May 09 '26 18:05 Hmbown