tinyhumansai/openhuman · error

[chat] applyOpenRouterFreeModels failed

Error message

[chat] applyOpenRouterFreeModels failed

What it means

Applying the OpenRouter free-models preset failed in the chat conversations view: the applyOpenRouterFreeModels call (configures OpenRouter free-tier model routes) rejected after the UI set status 'saving'. The handler sets an error status; the model configuration is unchanged, so the chat continues using the previously configured routes.

Source

Thrown at app/src/features/conversations/Conversations.tsx:576

      if (shouldSyncChatRoute) {
        debug('[chat][route] created thread thread=%s navigate=true', thread.id);
        navigate(chatThreadPath(thread.id));
      } else {
        debug('[chat][route] created thread thread=%s navigate=false', thread.id);
      }
    } catch (error) {
      debug('[chat] create thread failed: %O', error);
      setSendError(chatSendError('create_thread_failed', t('chat.createThreadFailed')));
    }
  };

  const handleUseOpenRouterFree = async () => {
    setOpenRouterStatus('saving');
    try {
      await applyOpenRouterFreeModels();
      setOpenRouterStatus('idle');
    } catch (err) {
      console.warn('[chat] applyOpenRouterFreeModels failed', err);
      setOpenRouterStatus('error');
    }
  };

  const handleStartEditTitle = (threadId: string) => {
    const thr = threads.find(t => t.id === threadId);
    debug('[chat] thread rename: start thread=%s', threadId);
    setEditTitleValue(thr?.title ?? '');
    ignoreNextTitleBlurRef.current = true;
    setEditingThreadId(threadId);
    const scheduleSelect = window.requestAnimationFrame ?? window.setTimeout;
    scheduleSelect(() => {
      editTitleInputRef.current?.select();
      ignoreNextTitleBlurRef.current = false;
    });
  };

  const handleCommitTitle = (threadId: string) => {

View on GitHub (pinned to 7491200858)

Solutions

  1. Check the console-warned error — auth failure means the OpenRouter key is missing/expired
  2. Verify an OpenRouter API key is configured in provider settings before applying the free-models preset
  3. Retry the apply action once the key/config issue is fixed
  4. Inspect the core log for the inference/routing config write if the error is a validation rejection
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at app/src/features/conversations/Conversations.tsx:576 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/b739e0c83dec73fc. Report an issue: GitHub.