modelanalyzer

package
v0.0.1-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package modelanalyzer is the production reasoning.Analyzer: it connects a model client to the read-only MCP tools for one pinned analysis and retries failed attempts.

Each attempt opens a fresh in-memory MCP session over the same reasoning.ContextProvider and runs reasoning.AnalyzeCandidateWithTools. Only transport, MCP, and decoding errors are retried; a policy rejection is a successful analysis with a rejected outcome and is never retried into a different answer. Because every attempt sees the same pinned packet and graph revision, a retry cannot observe newer state. When all attempts fail, the error stops the reasoning service; see reasoning.Service.Run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer runs model investigations with bounded retry.

func New

func New(client reasoning.Client, config Config) (*Analyzer, error)

New returns an analyzer for client. The client must have an endpoint.

func (*Analyzer) Analyze

func (analyzer *Analyzer) Analyze(ctx context.Context, packet reasoning.Packet, provider *reasoning.ContextProvider) (reasoning.AnalysisRun, error)

Analyze implements reasoning.Analyzer. The returned run records every failed attempt's error, including when a later attempt succeeds.

type Config

type Config struct {
	Analysis    reasoning.AnalysisConfig
	MaxAttempts int
}

Config configures an Analyzer. MaxAttempts defaults to 3.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL