continuedev/continue · error · Error

Invalid assistant identifier: ${options.assistant}. Expected

Error message

Invalid assistant identifier: ${options.assistant}. Expected format: owner-slug/package-slug

What it means

Continue.from throws when decodePackageSlug could not split options.assistant into a non-empty ownerSlug and packageSlug — i.e. the identifier is not in 'owner-slug/package-slug' form.

Source

Thrown at packages/continue-sdk/typescript/src/Continue.ts:114

  ): Promise<ContinueClientBase | ContinueClient> {
    const baseURL = options.baseURL || "https://api.continue.dev/";

    const continueClient = new DefaultApi(
      new Configuration({
        basePath: baseURL,
        accessToken: options.apiKey
          ? async () => options.apiKey as string
          : undefined,
      }),
    );

    if (!options.assistant) {
      return { api: continueClient };
    }

    const { ownerSlug, packageSlug } = decodePackageSlug(options.assistant);
    if (!ownerSlug || !packageSlug) {
      throw new Error(
        `Invalid assistant identifier: ${options.assistant}. Expected format: owner-slug/package-slug`,
      );
    }

    const assistants = await continueClient.listAssistants({
      organizationId: options.organizationId,
      alwaysUseProxy: "true",
    });

    const assistantRes = assistants.find(
      (a) => a.ownerSlug === ownerSlug && a.packageSlug === packageSlug,
    );

    if (!assistantRes) {
      throw new Error(`Assistant ${options.assistant} not found`);
    }

    const assistant = new Assistant(assistantRes.configResult.config);

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Use the exact 'owner-slug/package-slug' identifier from the hub listing
  2. Verify with listAssistants that the identifier exists
  3. Trim whitespace and check for the single '/' separator before calling
  4. Validate the slug format with a regex first

Example fix

// before
const { api } = await Continue.from({ assistant: 'my-assistant' });

// after
const { api } = await Continue.from({ assistant: 'continue/recommended' });
Defensive patterns

Strategy: validation

Validate before calling

const m = /^([\w-]+)\/([\w-]+)$/.exec(options.assistant ?? ''); if (!m) throw new Error('bad slug');

Type guard

function isAssistantSlug(s: string): s is `${string}/${string}` { return /^[^/\s]+\/[^/\s]+$/.test(s); }

Try / catch

try { const { api } = await Continue.from(opts); } catch (e) { if (/Expected format/.test(e.message)) { /* prompt user for correct slug */ } else throw e; }

Prevention

When it happens

Trigger: Calling Continue.from({ assistant: 'gpt4' }) or any string without a '/', or with empty segments like '/foo' or 'foo/'.

Common situations: Passing a bare assistant name, a hub URL instead of the slug, or whitespace/typo breaking the slash format.

Related errors


AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27). Data as JSON: /api/errors/93d6da5dd00036e4. Report an issue: GitHub.