Skip to content

Pass routing config (minConfidence, pinnedModels) to classifyWithRouter #11

@evansantos

Description

@evansantos

Context

GitSniff PR #8 finding (ℹ️ Info): classifyWithRouter is called without passing the user's routing config.

Problem

In src/index.ts, the llm_input hook calls:

classifyWithRouter(classificationMessages, { originalModel: (event as any).model });

But pluginConfig.routing.minConfidence and pluginConfig.routing.pinnedModels are not passed through. The HybridRouter uses its own defaults instead of the user's configured preferences.

Suggested Fix

Pass config through to classifyWithRouter:

classifyWithRouter(classificationMessages, { 
  originalModel: (event as any).model,
  minConfidence: pluginConfig.routing.minConfidence,
  pinnedModels: pluginConfig.routing.pinnedModels,
});

May require extending classifyWithRouter signature to accept these params and forward to the router.

Files to Change

  • src/index.ts — pass config to classifier
  • src/classifier/clawrouter-classifier.ts — accept and forward config params

Ref: PR #8 GitSniff review

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions