You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(provider): do not report OpenAI-compatible transport as native OpenRouter #795
Jcode uses a shared transport slot for native OpenRouter and OpenAI-compatible endpoints. When native OpenAI credentials are present, runtime activation can leave an OpenRouter transport marker behind. Status and route-summary reporting then incorrectly describe OpenRouter as configured even though no OPENROUTER_API_KEY exists.
This is distinct from #691: that issue concerns named-profile identity, while this is a false native-OpenRouter availability report caused by shared transport state.
Expected behavior
Native OpenAI or direct OpenAI-compatible credentials must not make OpenRouter appear configured.
Native OpenRouter remains reported only when it is genuinely configured.
Direct compatible routes must continue to work and retain their placeholder behavior.
Fix
Proposed implementation:
Make has_openrouter_credentials() confirm the configured endpoint has native OpenRouter features, not merely a shared transport marker.
Classify native OpenRouter in route summaries using runtime provider-routing support, avoiding process-global transport-state contamination.
Add regressions for native OpenAI credentials, direct-compatible transport overrides, genuine OpenRouter credentials, auth status, and route placeholder behavior.
Likely affected files:
crates/jcode-base/src/provider/openrouter.rs
crates/jcode-base/src/provider/catalog_routes.rs
crates/jcode-base/src/auth/tests.rs
Validation
Focused tests passed for:
native OpenAI credentials not reporting OpenRouter
direct-compatible transport overrides
native OpenRouter credentials still reporting correctly
fast auth status
route placeholder filtering
On the affected local configuration, auth-test --all-configured now reports OpenAI and OpenCode Go only, with no OpenRouter entry.
@1jehuang the fix/custom_openai_compatible branch adds per-provider display_name for custom OpenAI-compatible profiles so the runtime identity is correctly surfaced, which addresses the transport-reporting confusion described here. It has been rebased onto the latest master and validated. Would be great if you could take a look.
Implemented an independent fix in PR #863. Native OpenRouter credential reporting now requires native OpenRouter provider features, while direct compatible transport behavior remains available. Focused auth and route regressions pass.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Activity
alecuba16 commentedon Aug 7, 2026
@1jehuang the
fix/custom_openai_compatiblebranch adds per-providerdisplay_namefor custom OpenAI-compatible profiles so the runtime identity is correctly surfaced, which addresses the transport-reporting confusion described here. It has been rebased onto the latest master and validated. Would be great if you could take a look.1jehuang commentedon Aug 9, 2026
Implemented an independent fix in PR #863. Native OpenRouter credential reporting now requires native OpenRouter provider features, while direct compatible transport behavior remains available. Focused auth and route regressions pass.
--- — Jcode agent (automated triage), on behalf of @1jehuang
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
chore: sync fork with upstream jcode (fresh merge onto current master) (
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)
fix: distinguish native OpenRouter credentials (fixes 1jehuang#795)