Skip to content

Improve custom provider settings and add providers from native clients - #352

Merged
sambitcreate merged 7 commits into
mainfrom
feature/provider-settings-client-creation
Oct 5, 2026
Merged

sambitcreate merged 7 commits into
mainfrom
feature/provider-settings-client-creation

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Custom provider settings showed catalog-inherited Vision and Reasoning as enabled even when a private connection was sending text-only requests. Settings now show the connection's actual capabilities and preserve explicit overrides, including the maximum-image disabling limit.

The custom editor now follows Aiden's grouped settings surfaces, with connection details first and Connection options / Model options disclosed on demand. Per-model summaries replace the expanded badge table. Onboarding explains connection-owned capabilities and paired-client setup. An interactive before/after preview with sample data is available locally at /tmp/aiden-provider-preview/index.html (temporary, not shipped).

Paired iOS and Android Settings can add a custom provider through the optional revision 22 providers-create-v1 endpoint. Creation requires server:read and workspace:manage, explicit foreground intent, bounded model declarations, and an idempotency key. A new write-only API key uses the desktop's encrypted credential transaction. The endpoint never overwrites an existing connection/key or fetches the inference endpoint. Native drafts and retries belong to the active host; both forms progressively disclose connection/capability options.

Validation:

  • Desktop build, lint, application and E2E type checks; provider/model, router, protocol and operation suites (135 tests), custom-model options, onboarding (64 tests), shared preflight and the full Remote suite.
  • Nine deterministic Electron tests cover settings, custom capabilities, persistence/rediscovery, onboarding, keyboard behavior and provider removal; the final rerun includes zero-image disabling/re-enabling.
  • Android testDebugUnitTest, lintDebug, and compileDebugAndroidTestKotlin pass.
  • iOS simulator focused RemoteClient/Phase0 suites: 120 passed, five existing skips, zero failures.
  • Two fresh-context GPT-6.1 Sol medium reviews completed. Fixed metadata-order-sensitive retry recovery, accessible Android switch labels, password keyboard input, and native field validation. Hosted review additionally caught incomplete credential publication on replay. Retrying now recovers the originally journaled endpoint-bound key and rejects recovery failures without acknowledging completion or rotating a replay key. Fault-injection tests cover repeated backend failures, successful original-key recovery, missing credentials, and keyless operation. Follow-up reviews found no remaining actionable issues.

The installed app and hosted inference server were not replaced or configured by this patch. Physical-device and live-server vision acceptance remain separate from these deterministic checks.

Merged latest origin/main at 21e3dc3c (chat-fork revision 21); this provider change now claims revision 22. Conflict resolutions retain both appended protocol/router tests and the combined fixture. Package test scripts retain both branches' entries. After merging, full Remote tests, focused provider/protocol/operation tests (55), TypeScript, lint, iOS release policy (52), CI policy (16), Android unit tests, and iOS RemoteClient/Phase0 simulator suites (120 passed, five existing skips) pass. Full hosted CI37379350840 is green on exact head16fa024505f2c8143b6b94a01828101472aa5c19, including all desktop/Electron, iOS, Android, Linux, CLI and required checks. Latest-main ancestry and revision22 over main21 were reverified immediately before merge; no unresolved review findings.

Hosted CI follow-up: the renderer-other suite passed, but its preserved iOS release-policy check failed because the new Providers screen was omitted from the reviewed shipping-source inventory. The inventory is corrected; full local test:ios-release passes (20 Ruby tests and 32 Node tests). Full exact-head CI is green.

Infrastructure delay: GitHub Actions incident prevented several latest-head jobs from acquiring hosted runners. Their job annotations confirm runner acquisition failure with no steps run. GitHub subsequently reported Actions operating normally. Latest-main merge now starts fresh CI on a new head, superseding the cancelled checks; no merge until full exact-head checks pass.

Latest-head Android infrastructure failure: job111997132725 stopped at SDK installation with Android Emulator: Error on ZipFile unknown archive; compilation and tests were skipped. Local Android unit validation passed. The initial job retry was rejected while the workflow was active. After completion, a single failed-job rerun was accepted at 23:15 UTC on the same head; Android and the dependent CI aggregate passed on that single rerun. All other exact-head checks passed, including iOS, desktop unit suites, three Electron E2E shards, Linux and CLI.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Provider-creation retries can report success while the required API key is still uninstalled. The credential-recovery gap below should be fixed before merging.

Reviewed changes across desktop provider settings, the Remote creation contract, and both native clients, including the two follow-up commits.

  • Connection capabilities: Private connections show their own image/reasoning support rather than borrowing public-model capabilities, including zero-image overrides.
  • Desktop settings: Connection and model options are progressively disclosed, provider rows show model counts, and onboarding explains native setup.
  • Remote creation: Revision 21 adds feature-gated, authorized, foreground-only custom-provider creation with bounded declarations, write-only encrypted credentials, and idempotent replay.
  • Native clients: iOS and Android add provider forms with host-owned drafts, validation, stable retry keys, and shared Android settings colors.

Validation: 176 focused desktop/Remote tests and 56 credential-recovery tests passed on the initial head; 82 focused tests and 45 Android tests passed on 34aba211. TypeScript checking passed. A fault-injected service-seam reproduction confirmed the finding on the latest reviewed head. iOS XCTest and Electron E2E were not run on this Linux runner.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread main/services/aiden-remote-providers.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since 34aba211, focused on credential recovery during provider-creation replay and integration with the current main baseline.

  • Completed credential recovery: Matching keyed-provider retries now reconcile the encrypted transaction and verify the endpoint-bound key before acknowledging success, without replacing it from the replay payload.
  • Rechecked replay state: Recovery is followed by authorization checks and a fresh provider comparison; successful replay broadcasts the configuration change, while keyless providers remain independent of credential storage.
  • Extended failure coverage: Added behavioral cases for repeated backend failures, original-key recovery, missing credentials, and keyless replay.
  • Merged the baseline: Incorporated main while retaining the additive Remote revision 21 contract.

Validation: All 166 focused Remote, credential, and portable-config tests passed; npx tsc --noEmit passed. The production recovery and binding path was inspected directly. iOS XCTest and Electron E2E were not run on this Linux runner; exact-head hosted CI was not independently verified.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@very-hermes-bot

very-hermes-bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: 16fa024505f2c8143b6b94a01828101472aa5c19
Generated: 2026-10-05T22:03:38+00:00
Reviews: 1

Summary

Custom provider configuration now reflects connection-owned capabilities and explicit overrides rather than inheriting public catalog metadata, preventing private endpoints from advertising unsupported vision or reasoning features. Desktop settings adopt grouped card surfaces that cleanly separate connection credentials from on-demand connection and per-model capability controls. Paired iOS and Android clients gain native custom provider creation through the revision 22 POST /providers endpoint under authenticated, foreground-only control with stable idempotency recovery. Maintainers should double-check that the write-only API key remains strictly confined to the encrypted rotation pipeline and is never surfaced in receipts, model catalogs, or remote logging.

Confidence Score: 5/5

Full end-to-end tracing across macOS desktop host services, shared contract fixtures, and both native mobile clients (Swift/SwiftUI and Kotlin/Jetpack Compose) verified identical validation rules, credential-isolation semantics, and replay recovery behavior.

📁 Important Files Changed
  • main/services/aiden-remote-providers.ts: Implements remote custom provider creation, strict input validation, stable ID hashing from device identity and creation key, and journaled replay recovery without key rotation.
  • main/services/aiden-remote-router.ts: Exposes and gates the revision 22 POST /providers route behind workspace:manage and server:read permissions, foreground-only intent, and idempotency key constraints.
  • main/services/provider-model-info-core.ts: Disengages catalog vision and reasoning inheritance for custom providers so runtime limits and settings reflect connection metadata and image-disabling overrides.
  • renderer/components/settings/provider-editor.tsx & custom-model-options.tsx: Restructures custom provider editing into grouped surfaces with collapsed connection options, model capability controls, and explicit text-only vs image-enabled summaries.
  • ios/AidenOnTheGo/Features/Remote/AidenProvidersView.swift & AidenRemoteClient.swift: Adds the iOS provider management view and client DTOs with secure, write-only credential submission, automatic API key erasure on dismiss, and draft-bound idempotency retries.
  • android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/settings/AidenProviderSettings.kt & AidenWorkspaceEnvironment.kt: Adds Android Compose provider settings and creation dialogs with masked credential entry, validation feedback, and redacted string conversion.
  • protocol/aiden-remote/v1/openapi.json & fixtures/contract.json: Updates the OpenAPI specification and shared multi-platform test fixtures to revision 22.

Findings

No findings.

📊 Sequence Diagram
sequenceDiagram
    autonumber
    actor User as Mobile User
    participant Client as Native Client (iOS / Android)
    participant Router as Aiden Remote Router (Host)
    participant ProviderSvc as Remote Provider Service
    participant ConfigStore as Config & Secrets Store

    User->>Client: Enter connection & model details, tap Save
    Client->>Router: POST /providers (Idempotency-Key, write-only apiKey, confirmedForeground)
    Note over Router: Authenticate device (workspace:manage + server:read)
    Router->>ProviderSvc: create(deviceId, key, draft, isCurrent)
    alt New provider
        ProviderSvc->>ConfigStore: saveProviderWithCredentialRotation(provider, apiKey)
        Note over ConfigStore: Save portable config & rotate key in secure backend
        ProviderSvc->>Router: Return receipt {id, label, models}
    else Idempotent replay / retry
        ProviderSvc->>ConfigStore: get(id) & recoverCredential(provider)
        Note over ProviderSvc: Verify existing connection match; do not rotate key
        ProviderSvc->>Router: Return cached receipt {id, label, models}
    end
    Router-->>Client: 201 Created (Receipt only, no credentials)
    Note over Client: Erase local apiKey from memory & dismiss form
    Client->>Router: GET /models
    Router-->>Client: Updated model catalog with active capabilities
Loading

Machine-Readable Findings

[]

Last reviewed commit: 16fa024505f2
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since e18af26b, focused on the iOS shipping-source inventory correction in 930bf4fc.

  • Registered the Providers screen in the reviewed shipping-source inventory, matching its existing Xcode build registration and including it in shipping-source policy checks without changing application behavior.

Validation: npm run test:ios-release passed with 20 Ruby tests and 32 Node tests, including source-phase equality and orphan-source detection. No open prior Pullfrog threads remain. iOS XCTest was not run on this Linux runner; hosted CI on this exact head is still pending.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes since 930bf4fc, focused on the main merge and Remote contract revision reconciliation in 16fa0245.

  • Merged the latest baseline, retaining provider creation and credential recovery alongside main's chat-fork runtime wiring, fixture data, and appended protocol/router tests.
  • Advanced provider creation to revision 22, keeping desktop, iOS, Android, fixture health metadata, and API documentation aligned while preserving chat forking's revision 21 contract.
  • Preserved test registration, retaining the custom-model-options suite and main's chat-fork test inventory.

Validation: 133 focused Remote tests, 14 custom-model-options tests, 52 iOS release-policy tests, and 16 CI-policy tests passed; TypeScript checking passed. The focused Android client/fixture Gradle task completed successfully. iOS XCTest and Electron E2E were not run on this Linux runner.

Exact-head CI is not green: Android build and APK failed before project verification during SDK installation with Warning: An error occurred while preparing SDK package Android Emulator: Error on ZipFile unknown archive. Other hosted checks remain pending; this code review does not establish merge readiness.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sambitcreate
sambitcreate merged commit 5c09487 into main Oct 5, 2026
45 of 47 checks passed
@sambitcreate
sambitcreate deleted the feature/provider-settings-client-creation branch October 5, 2026 23:25
sambitcreate added a commit that referenced this pull request Oct 6, 2026
…ct revision 23

#349 (chat fork, revision 21) and #352 (provider creation, revision 22)
merged first, so chat-messages-window-metadata-v1 moves to revision 23
across the server, iOS, Android, fixtures, OpenAPI and docs. Window pages
also carry main's forkedFrom lineage so a windowed refresh keeps the fork
row on both clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants