Bug
convertDocument in pkg/model/provider/anthropic/client.go passes c.ModelConfig.Model (e.g. claude-sonnet-4-6) to modelcaps.Load, but Load requires a fully-qualified provider/model identifier (e.g. anthropic/claude-sonnet-4-6).
Root cause
modelcaps.Load does:
parts := strings.SplitN(id, "/", 2)
if len(parts) != 2 {
return nil, fmt.Errorf("invalid model ID: %q", id)
}
When the bare model name (no /) is passed, it returns an error and falls back to ModelCapabilities{modelFound: false}, which means Supports("image/png") == false.
Effect
Every image and PDF document attachment is silently dropped with:
level=WARN msg="attachment dropped" reason="model does not support MIME type \"image/png\""
...even for models like claude-sonnet-4-6 that fully support images.
Location
pkg/model/provider/anthropic/client.go line where convertDocument is called:
docBlocks, err := convertDocument(ctx, *part.Document, c.ModelConfig.Model)
Should be:
docBlocks, err := convertDocument(ctx, *part.Document, c.ModelConfig.Provider+"/"+c.ModelConfig.Model)
The same issue likely affects the OpenAI/oaistream provider if it also calls convertDocument with a bare model name.
Notes
- The teamloader correctly uses
modelCfg.Provider+"/"+modelCfg.Model when calling modelsStore.GetModel — the Anthropic client should follow the same pattern.
Bug
convertDocumentinpkg/model/provider/anthropic/client.gopassesc.ModelConfig.Model(e.g.claude-sonnet-4-6) tomodelcaps.Load, butLoadrequires a fully-qualifiedprovider/modelidentifier (e.g.anthropic/claude-sonnet-4-6).Root cause
modelcaps.Loaddoes:When the bare model name (no
/) is passed, it returns an error and falls back toModelCapabilities{modelFound: false}, which meansSupports("image/png") == false.Effect
Every image and PDF document attachment is silently dropped with:
...even for models like
claude-sonnet-4-6that fully support images.Location
pkg/model/provider/anthropic/client.goline whereconvertDocumentis called:Should be:
The same issue likely affects the OpenAI/oaistream provider if it also calls
convertDocumentwith a bare model name.Notes
modelCfg.Provider+"/"+modelCfg.Modelwhen callingmodelsStore.GetModel— the Anthropic client should follow the same pattern.