slopus/happy · error
Unsupported vendor: ${vendor}
Error message
Unsupported vendor: ${vendor} What it means
handleConnectVendor supports a fixed set of vendors (e.g. claude, gemini); any other value falls into the final else branch and throws 'Unsupported vendor: <vendor>'. It's an argument-validation error for the `happy connect <vendor>` command.
Source
Thrown at packages/happy-cli/src/commands/connect.ts:116
process.exit(0);
} else if (vendor === 'claude') {
console.log('🚀 Registering Anthropic token with server');
const anthropicAuthTokens = await authenticateClaude();
await api.registerVendorToken('anthropic', { oauth: anthropicAuthTokens });
console.log('✅ Anthropic token registered with server');
process.exit(0);
} else if (vendor === 'gemini') {
console.log('🚀 Registering Gemini token with server');
const geminiAuthTokens = await authenticateGemini();
await api.registerVendorToken('gemini', { oauth: geminiAuthTokens });
console.log('✅ Gemini token registered with server');
// Also update local Gemini config to keep tokens in sync
updateLocalGeminiCredentials(geminiAuthTokens);
process.exit(0);
} else {
throw new Error(`Unsupported vendor: ${vendor}`);
}
}
/**
* Show connection status for all vendors
*/
async function handleConnectStatus(): Promise<void> {
console.log(chalk.bold('\n🔌 Connection Status\n'));
// Check if authenticated
const credentials = await readCredentials();
if (!credentials) {
console.log(chalk.yellow('⚠️ Not authenticated with Happy'));
console.log(chalk.gray(' Please run "happy auth login" first'));
process.exit(1);
}
// Create API clientView on GitHub (pinned to b824cd0a46)
Solutions
- Run `happy connect --help` (or check the status subcommand) to list supported vendors
- Fix the spelling of the vendor argument
- Update happy-cli to the latest version if the vendor was recently added
- For Codex, use `happy codex` instead of `happy connect codex`
Example fix
// before $ happy connect gemni Error: Unsupported vendor: gemni // after $ happy connect gemini
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_VENDORS = ['claude', 'gemini'] as const;
type Vendor = typeof SUPPORTED_VENDORS[number];
function isSupportedVendor(v: string): v is Vendor {
return (SUPPORTED_VENDORS as readonly string[]).includes(v);
}
if (!isSupportedVendor(vendor)) {
console.error(`Unsupported vendor: ${vendor}. Supported: ${SUPPORTED_VENDORS.join(', ')}`);
process.exit(1);
} Type guard
function isVendor(v: string): v is 'claude' | 'gemini' {
return v === 'claude' || v === 'gemini';
} Try / catch
try {
await handleConnectVendor(vendor);
} catch (error) {
if ((error as Error).message.startsWith('Unsupported vendor:')) {
console.error((error as Error).message + '\nRun `happy connect --help` for supported vendors.');
} else { throw error; }
} Prevention
- Use tab-completion or --help to pick the vendor argument
- Keep happy-cli updated so newly added vendors are available
- Validate vendor values in scripts against the supported list before invoking the CLI
When it happens
Trigger: Running `happy connect <vendor>` with a misspelled or unimplemented vendor name (e.g. `happy connect codex`, `happy connect gemni`), or an older CLI invoked with a vendor added only in newer versions.
Common situations: Typo in the vendor argument; following docs/blogs for a vendor your CLI version doesn't support yet; scripts parameterizing the vendor with a wrong value.
Related errors
- Usage: happy acp <agent-name> or happy acp -- <command> [arg
- Missing command after "--". Usage: happy acp -- <command> [a
- Happy session ID is required: happy resume <session-id>
- Daemon-spawned sessions cannot use local/interactive mode. U
- Unsupported Claude goal action
AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31).
Data as JSON: /api/errors/1e76d00f7d525a65.
Report an issue: GitHub.