t8y2/dbx · warning · UnsupportedOperationException

Completion assistant search is not supported by this agent

Error message

Completion assistant search is not supported by this agent

What it means

completionAssistantSearch provides SQL-completion assistant lookups; the base agent defaults to throwing UnsupportedOperationException because this capability is not implemented generically. Only agents/databases with dedicated completion support override it.

Source

Thrown at agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:25

public abstract class BaseDatabaseAgent implements DatabaseAgent {
    @Override
    public List<ObjectInfo> listObjects(String schema) {
        List<ObjectInfo> result = new ArrayList<>();
        for (TableInfo table : listTables(schema)) {
            result.add(new ObjectInfo(table.getName(), table.getTable_type(), schema, table.getComment()));
        }
        return result;
    }

    @Override
    public ObjectSource getObjectSource(String schema, String name, String objectType) {
        throw new UnsupportedOperationException("Object source is not supported");
    }

    @Override
    public CompletionAssistantResponse completionAssistantSearch(CompletionAssistantRequest request) {
        throw new UnsupportedOperationException("Completion assistant search is not supported by this agent");
    }

    @Override
    public String getTableDdl(String schema, String table) {
        List<IndexInfo> indexes;
        try {
            indexes = listIndexes(schema, table);
        } catch (RuntimeException e) {
            indexes = Collections.emptyList();
        }

        List<ForeignKeyInfo> foreignKeys;
        try {
            foreignKeys = listForeignKeys(schema, table);
        } catch (RuntimeException e) {
            foreignKeys = Collections.emptyList();
        }

View on GitHub (pinned to c0390bff16)

Solutions

  1. Route completion requests to an agent implementation that supports them
  2. Feature-detect support before calling and disable completion UI gracefully
  3. Override completionAssistantSearch in your agent if your backend can serve it
  4. Catch UnsupportedOperationException and return an empty result

Example fix

// before
var resp = agent.completionAssistantSearch(request); // throws
// after
CompletionAssistantResponse resp;
try {
    resp = agent.completionAssistantSearch(request);
} catch (UnsupportedOperationException e) {
    resp = CompletionAssistantResponse.empty();
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    CompletionAssistantResponse r = agent.completionAssistantSearch(request);
} catch (UnsupportedOperationException e) {
    CompletionAssistantResponse r = CompletionAssistantResponse.empty();
}

Prevention

When it happens

Trigger: Invoking completionAssistantSearch(request) on an agent subclass that inherits the BaseDatabaseAgent default (no completion-assistant support).

Common situations: Editor/IDE completion features wired against a driver agent that lacks completion backing; uniform feature dispatch across heterogeneous database agents.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/a4de672cc65b0f69. Report an issue: GitHub.