sipeed/picoclaw · error

isolatedSideQuestionProvider

Error message

isolatedSideQuestionProvider: %w

What it means

Context wrapper in isolatedSideQuestionProvider around sideQuestionModelConfig: resolving the model configuration for the /btw isolated provider failed — the wrapped %w typically names an unresolvable model name or missing model entry in config. Distinct from the sibling 'no agent available' guard, which fires one line earlier; here an agent exists but its model config cannot be built.

Solutions

  1. Read the wrapped error to see which model-config lookup failed
  2. Ensure the side-question model name resolves in the configured ModelList
  3. Set an explicit side-question model in config
  4. Fall back to the base model name for /btw questions when the dedicated one is unavailable
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at pkg/agent/turn_coord.go:645 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/af9cdadbb1b6be58. Report an issue: GitHub.

Appendix: source

Thrown at pkg/agent/turn_coord.go:645

	baseModelName string,
	candidate providers.FallbackCandidate,
) (providers.LLMProvider, string, *config.ModelConfig, func(), error) {
	if agent == nil {
		return nil, "", nil, func() {}, fmt.Errorf("isolatedSideQuestionProvider: no agent available for /btw")
	}

	modelCfg, err := al.sideQuestionModelConfig(agent, baseModelName, candidate)
	if err != nil {
		return nil, "", nil, func() {}, fmt.Errorf("isolatedSideQuestionProvider: %w", err)
	}

	factory := al.providerFactory
	if factory == nil {
		factory = providers.CreateProviderFromConfig
	}
	provider, modelID, err := factory(modelCfg)
	if err != nil {
		return nil, "", nil, func() {}, fmt.Errorf("isolatedSideQuestionProvider: %w", err)
	}

	cleanup := func() {
		closeProviderIfStateful(provider)
	}
	return provider, modelID, modelCfg, cleanup, nil
}

func (al *AgentLoop) sideQuestionModelConfig(
	agent *AgentInstance,
	baseModelName string,
	candidate providers.FallbackCandidate,
) (*config.ModelConfig, error) {
	if agent == nil {
		return nil, fmt.Errorf("sideQuestionModelConfig: no agent available for /btw")
	}

	if name := modelAliasFromCandidateIdentityKey(candidate.IdentityKey); name != "" {

View on GitHub (pinned to 49183d7e8d)