docs: iOS managed app — provider quick-connect and model switching guides#3
Conversation
Co-authored-by: deankroker <9809445+deankroker@users.noreply.github.com>
|
Add to /dean folder instead of docs please @copilot |
Co-authored-by: deankroker <9809445+deankroker@users.noreply.github.com>
|
Or you know what i think it'd be good to have model switching be separate @copilot |
Co-authored-by: deankroker <9809445+deankroker@users.noreply.github.com>
Added |
|
Cool @copilot so how would you recommend controls of changing this to surface in the ui? |
Two surfaces work well together: 1. Chat navigation bar (quick switch) .toolbar {
ToolbarItem(placement: .principal) {
Button {
showModelPicker = true
} label: {
HStack(spacing: 4) {
Text(currentModelDisplayName)
.font(.headline)
Image(systemName: "chevron.down")
.imageScale(.small)
}
}
.sheet(isPresented: $showModelPicker) {
ModelPickerView(fileAPI: fileAPI)
}
}
}2. Settings screen (persistent preference) The two-surface approach means:
Filter both surfaces using |
No documentation existed for how a managed iOS app (with Supabase auth + AKS-hosted OpenClaw containers) should implement provider authentication or model switching. Each provider has a different auth pattern; without a concrete guide, iOS app developers have to reverse-engineer the CLI flows. Model switching is a distinct concern from provider auth and warrants its own reference.
Summary
dean/ios-managed-app.mdcovering all provider auth patterns; newdean/ios-model-switching.mdcovering model picker UI, primary/fallback/allowlist/image model config, filtering by connected providers, and recommended UI surfaces (nav bar quick-switch badge + settings row). Thedocs/docs.jsonnav entry previously added underinstall/ios-managed-apphas been removed.New:
dean/ios-managed-app.md— guide organized by auth type:SecureField+ file-api writeASWebAuthenticationSessionOAuthCore pattern for every token/key provider — read → merge → write
openclaw.jsonvia the file-api bridge (authenticated with the user's Supabase JWT):Includes a full
AddProviderViewSwiftUI picker that wires all flows throughnavigationDestination, plus a security considerations section covering key masking, OAuth scope minimization, and AWS IAM hygiene.New:
dean/ios-model-switching.md— separate guide covering:ModelEntrycatalog with frontier/balanced/fast/local tiersModelPickerViewSwiftUI component with grouped sections and live selection feedbacksetFallbacks()helper for ordered fallback listssetAllowlist()to restrict in-session/modelswitching (cost control)setImageModel()for image-processing workflowsNavigationBar(sheet presentation for quick in-session switching) + a "Model" settings row for persistent preference and advanced config (fallbacks, allowlist)Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None. Docs only.
Security Impact (required)
Repro + Verification
Environment
Steps
dean/ios-managed-app.mdfor provider quick-connect patternsdean/ios-model-switching.mdfor model switching patterns and UI surface recommendationsExpected
Actual
Evidence
Docs-only change; no runtime evidence applicable.
Human Verification (required)
docs/providers/*.mdfor accuracy (env key names, base URLs, model IDs). Model switching config keys verified againstdocs/concepts/models.mdanddocs/cli/models.md. UI surface recommendations verified against common iOS AI chat app patterns.Review Conversations
Compatibility / Migration
Failure Recovery (if this breaks)
dean/ios-managed-app.mdand/ordean/ios-model-switching.md.docs/docs.jsonnav entry was added).Risks and Mitigations
// adapt to your actual file-api client) rather than copy-paste production code.ios-model-switching.mdmay drift from available models as providers release new versions.Original prompt
Can you write a markdown per provider on how you would implement a quick connect of thr provider (options from token for OpenAI to full e2e flows to quick auth if we build an app to using your app) assuming users are running OpenClaw through a managed iOS app. See details on the arch below
OpenClaw iOS App
OpenClaw is a premium iOS application that provides users with their own personal AI assistant powered by Claude, running in dedicated containers in the cloud.
What is OpenClaw?
OpenClaw gives each user their own private AI assistant with:
Architecture
The file-api pod is a dedicated Node.js server exposed via Cloudflare Tunnel
(
files.spark.ooo) that handles all file operations (browse, read, write, delete) for theiOS app. It authenticates using the user's Supabase JWT and mounts the same Azure Files
share as the OpenClaw pods. See docs/ for full documentation.
Prerequisites
Development Tools
brew install azure-cli)brew install kubectl)Accounts Required
Local Setup
Setup Instructions
1. Deploy Azure Infrastructure
2. Set Up Supabase
3. Configure the iOS App
Create
Claw/Config.plist:FileAPIURLis the Cloudflare Tunnel endpoint for the file-api pod. See step 5b below.4. Configure StoreKit
com.openclaw.monthly($19.99/month)5a. Provision Container Pool
5b. Deploy File API
The file-api ...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.