refactor(settings): provider facts as data
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
#181: ModelProvider is the provider-descriptor table — label, effort ladder, flagship, endpoint, env var joined by wire dialect (chat/models paths + the SSE decoder selector), auth mode (Bearer vs Anthropic's header pair), keyless (nous rides the Portal login), and the ONE trailing-slash endpoint trim. The probe's URL builders, auth headers, and stream-decoder picks select by data; the per-dialect bodies and decoders stay separate functions, not switch clothing. ProviderCredential.resolve is the ONE credential rail (provider key, else the shared Portal session key for keyless providers — official endpoint ONLY, never a user-set URL). Settings' Test Connection and the new PassReadiness module both call it; the twice-implemented #175 fallback can no longer drift. One deliberate tightening, reviewer- blessed: a nous pass profile on a custom base_url with no pasted key now reads missingKey where the old session-model fallback said ready — the old copy had no endpoint gate at all. Pass readiness leaves the session model (PassReadiness.swift maps each pass surface to ready/missingKey/unknown over the descriptor; MentorSessionModel stores the verdicts and reads no keys or auth files). runPass and blindRead run their guards through one shared rail (guardOpenPieceRun) — identical refusal strings, blockers named honestly. No app-side model-settings store (ADR-0014 red line). Rider: the #179 mid-pass repoint pin polls the rig's hasHeldPrompt before releasing the held turn — runningPass flips before the one-shot engine parks its prompt, so firing into that window false-failed under parallel-suite load. Full suite 668/668 (xcresult executed count). Finish-audit: three reviewers (ponytail/security/general), zero findings above LOW; two ponytail trims and one pin tightening applied. Closes #181
This commit is contained in:
1 parent
218e2db397
commit
f49e4b6ca0
15 files changed
+506
-184
No files matched your search
@@ -251,10 +251,11 @@ private struct ProviderKeyBlock: View {
|
||||
.font(.system(size: 11.5))
|
||||
.foregroundStyle(DesignTokens.muted)
|
||||
}
|
||||
if provider == .nous {
|
||||
if provider.keyless {
|
||||
// #175: the engine auths nous through hermes' own Portal
|
||||
// login (device-code, shared across profiles) — the key
|
||||
// field is optional and bills the same account credits.
|
||||
// #181: keyed off the descriptor, like every provider fact.
|
||||
Text(
|
||||
"Chats ride your Hermes Portal login — no key needed once hermes is signed in (hermes auth add nous). "
|
||||
+ "A pasted key bills the same account credits (API or subscription).",
|
||||
|
||||
Reference in new issue
Block a user