fix(expo): support anthropic_oauth_json auth type in provider form
Build and Push Spoon Images / quality (push) Successful in 2m29s
Build and Push Spoon Images / build-images (push) Successful in 8m44s

The backend aiProviderProfiles authType union added 'anthropic_oauth_json'
but the Expo provider form's local AuthType type was stale, breaking
typecheck. Add the literal, a picker option, help text, and multiline
handling to match the Next app.

Claude-Session: https://claude.ai/code/session_01ScyZ1NhfN84LAnHpwhfEQk
This commit is contained in:
Gabriel Brown
2026-07-12 12:09:33 -04:00
parent ed88478ce6
commit c0dd8759af
@@ -20,7 +20,11 @@ type Provider =
| 'cloudflare_ai_gateway' | 'cloudflare_ai_gateway'
| 'custom_openai_compatible' | 'custom_openai_compatible'
| 'opencode_openai_login'; | 'opencode_openai_login';
type AuthType = 'api_key' | 'opencode_auth_json' | 'none'; type AuthType =
| 'api_key'
| 'opencode_auth_json'
| 'anthropic_oauth_json'
| 'none';
type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
type ExistingProfile = { type ExistingProfile = {
@@ -174,6 +178,7 @@ export const AiProviderProfileForm = ({
options={[ options={[
{ label: 'API key', value: 'api_key' }, { label: 'API key', value: 'api_key' },
{ label: 'Codex auth JSON', value: 'opencode_auth_json' }, { label: 'Codex auth JSON', value: 'opencode_auth_json' },
{ label: 'Anthropic OAuth JSON', value: 'anthropic_oauth_json' },
{ label: 'None', value: 'none' }, { label: 'None', value: 'none' },
]} ]}
value={authType} value={authType}
@@ -186,10 +191,20 @@ export const AiProviderProfileForm = ({
agent workspaces for Codex CLI runs. agent workspaces for Codex CLI runs.
</Text> </Text>
) : null} ) : null}
{authType === 'anthropic_oauth_json' ? (
<Text className='text-muted-foreground text-sm leading-5'>
Paste the credentials JSON from your Claude auth folder, for example
~/.claude/.credentials.json, and paste it here. Spoon writes it into
isolated agent workspaces for Claude Code CLI runs.
</Text>
) : null}
{authType !== 'none' ? ( {authType !== 'none' ? (
<Field <Field
label={authType === 'api_key' ? 'API key' : 'Auth JSON'} label={authType === 'api_key' ? 'API key' : 'Auth JSON'}
multiline={authType === 'opencode_auth_json'} multiline={
authType === 'opencode_auth_json' ||
authType === 'anthropic_oauth_json'
}
secureTextEntry={authType === 'api_key'} secureTextEntry={authType === 'api_key'}
value={secret} value={secret}
onChangeText={setSecret} onChangeText={setSecret}