t8y2/dbx · error

completion assistant search is not supported for this reques

Error message

completion assistant search is not supported for this request

What it means

This error is raised by completionAssistantSearchTypeMembers when the completion-assistant request asks for type-member completions but the request is not actually a type-members search: parentName is empty or the requested object kinds do not include type members (xuguCompletionRequestsTypeMembers returns false). It guards against mis-routed completion requests.

Source

Thrown at agents/drivers/xugu/type_members.go:166

	Spec string
}

func (s *server) completionAssistantSearch(request completionAssistantRequest) (completionAssistantResponse, error) {
	switch strings.ToLower(strings.TrimSpace(request.ParentType)) {
	case "type":
		return s.completionAssistantSearchTypeMembers(request)
	case "package":
		return s.completionAssistantSearchPackageMembers(request)
	}
	// Package members shipped before type members. Keep that request shape
	// working for already-running desktop clients that do not send parent_type.
	return s.completionAssistantSearchPackageMembers(request)
}

func (s *server) completionAssistantSearchTypeMembers(request completionAssistantRequest) (completionAssistantResponse, error) {
	parentName := strings.TrimSpace(request.ParentName)
	if parentName == "" || !xuguCompletionRequestsTypeMembers(request.ObjectKinds) {
		return completionAssistantResponse{}, errors.New("completion assistant search is not supported for this request")
	}
	parentSchema := strings.TrimSpace(request.ParentSchema)
	if parentSchema == "" {
		parentSchema = strings.TrimSpace(request.Schema)
	}
	if parentSchema == "" {
		return completionAssistantResponse{}, errors.New("parent_schema is required for Xugu type members")
	}

	typeDefinition, err := s.xuguTypeDefinition(parentSchema, parentName)
	if err != nil {
		return completionAssistantResponse{}, err
	}
	if typeDefinition.Kind != xuguObjectTypeKind {
		return completionAssistantResponse{Candidates: []completionAssistantCandidate{}, FallbackUsed: false}, nil
	}

	limit := request.MaxResults

View on GitHub (pinned to c0390bff16)

Solutions

  1. Set parent_name in the request to the qualified name of the parent type
  2. Ensure object_kinds includes the type-members kind so the request routes correctly
  3. Verify the client is calling the correct completion endpoint for its request type
  4. If parent_schema is also needed, supply it (or ensure schema is set) to pass subsequent checks

Example fix

// before
req := completionAssistantRequest{ObjectKinds: kinds} // parent_name missing
// after
req := completionAssistantRequest{ObjectKinds: kinds, ParentName: "my_schema.my_type"}
Defensive patterns

Strategy: validation

Validate before calling

// Validate the completion request before calling the assistant
if strings.TrimSpace(req.ParentName) == "" || !xuguCompletionRequestsTypeMembers(req.ObjectKinds) {
    return errors.New("type-member completion requires parent_name and type-members object_kinds")
}

Type guard

func supportsTypeMembersSearch(r completionAssistantRequest) bool {
    return strings.TrimSpace(r.ParentName) != "" && xuguCompletionRequestsTypeMembers(r.ObjectKinds)
}

Try / catch

resp, err := s.completionAssistantSearchTypeMembers(req)
if err != nil && strings.Contains(err.Error(), "not supported for this request") {
    // fall back to the generic completion search path
    resp, err = s.completionAssistantSearchDefault(req)
}

Prevention

When it happens

Trigger: Calling the completion assistant with a request whose ParentName is blank while ObjectKinds indicate (or fail to indicate) Xugu type-member completion, i.e. the request shape does not match the type-members search path.

Common situations: Client sends completion requests without setting parent_name when completing members of a Xugu structured/object type; a generic completion UI reuses the type-members endpoint for non-type requests; API version mismatch changing ObjectKinds values.

Related errors


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