Tencent/WeKnora · error

starter suggestion exceeds 200 characters

Error message

starter suggestion %d exceeds 200 characters

What it means

Content validation in QuestionSuggestionConfig.Validate: the starter at index %d exceeds the 200-character cap enforced to keep starter suggestions scannable in the UI. The %d locates the offending entry so the agent-authored config can be trimmed before it is persisted.

Solutions

  1. Truncate or rewrite the starter to 200 characters or fewer
  2. Prompt the authoring model for shorter suggestions
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/types/custom_agent.go:400 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/f913b61816b3070b. Report an issue: GitHub.

Appendix: source

Thrown at internal/types/custom_agent.go:400

	if c.FollowUps.Count < 1 || c.FollowUps.Count > 5 {
		return fmt.Errorf("follow-up suggestion count must be between 1 and 5")
	}
	if c.FollowUps.MaxContextTurns < 1 || c.FollowUps.MaxContextTurns > 5 {
		return fmt.Errorf("follow-up max_context_turns must be between 1 and 5")
	}
	if !oneOf(c.Starters.Mode, SuggestionModeCurated, SuggestionModeKnowledge, SuggestionModeHybrid) {
		return fmt.Errorf("invalid starter suggestion mode %q", c.Starters.Mode)
	}
	if !oneOf(c.FollowUps.Mode, SuggestionModeGenerated, SuggestionModeKnowledge, SuggestionModeHybrid) {
		return fmt.Errorf("invalid follow-up suggestion mode %q", c.FollowUps.Mode)
	}
	for i, item := range c.Starters.Items {
		trimmed := strings.TrimSpace(item)
		if trimmed == "" {
			return fmt.Errorf("starter suggestion %d cannot be empty", i+1)
		}
		if len([]rune(trimmed)) > 200 {
			return fmt.Errorf("starter suggestion %d exceeds 200 characters", i+1)
		}
	}
	if len([]rune(strings.TrimSpace(c.FollowUps.AdditionalInstruction))) > 2000 {
		return fmt.Errorf("follow-up additional_instruction exceeds 2000 characters")
	}
	for _, category := range c.FollowUps.Categories {
		if !oneOf(category, SuggestionCategoryClarify, SuggestionCategoryDeepen, SuggestionCategoryAction) {
			return fmt.Errorf("invalid follow-up suggestion category %q", category)
		}
	}
	return nil
}

func oneOf(value string, allowed ...string) bool {
	for _, candidate := range allowed {
		if value == candidate {
			return true
		}

View on GitHub (pinned to 988cbb0330)