Skip to content

Fix Windows startup with untrusted external auth#126

Merged
1jehuang merged 6 commits into
masterfrom
fix/issue-112-windows-external-auth
May 4, 2026
Merged

Fix Windows startup with untrusted external auth#126
1jehuang merged 6 commits into
masterfrom
fix/issue-112-windows-external-auth

Conversation

@1jehuang

@1jehuang 1jehuang commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Skip untrusted external auth sources during noninteractive auto-provider bootstrap instead of aborting server startup
  • Preserve fatal consent behavior for explicit provider choices
  • Add a regression test for noninteractive auto mode with untrusted OpenCode Claude auth
  • Include the regression in Windows smoke targeted validation

Validation

  • Local: Diff in /home/jeremy/jcode/src/provider/openrouter.rs:576:
    })
    .collect::<HashMap<_, _>>();
    if let Some(inferred_profile) = inferred_profile {
    �[31m- for (model, limit) in openai_compatible_profile_static_context_limits(inferred_profile) {
    �(B�[m�[32m+ for (model, limit) in openai_compatible_profile_static_context_limits(inferred_profile)
    �(B�[m�[32m+ {
    �(B�[m static_context_limits
    .entry(model.to_ascii_lowercase())
    .or_insert(limit);
    Diff in /home/jeremy/jcode/src/provider/openrouter_tests.rs:371:
    };
    config.model_catalog = false;

�[31m- let provider =
�(B�[m�[31m- OpenRouterProvider::new_named_openai_compatible("custom-deepseek", &config)
�(B�[m�[31m- .expect("provider");
�(B�[m�[32m+ let provider = OpenRouterProvider::new_named_openai_compatible("custom-deepseek", &config)
�(B�[m�[32m+ .expect("provider");
�(B�[m
assert_eq!(provider.context_window(), 1_000_000);
assert!(

Fixes #112


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@1jehuang 1jehuang merged commit 36b46fc into master May 4, 2026
9 of 10 checks passed
@1jehuang 1jehuang deleted the fix/issue-112-windows-external-auth branch May 4, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection lost — retrying (attempt 29, 4m 2s) — The system cannot find the file specified. (os error 2)

1 participant