Skip to content

agent-core-v2 tool.test.ts: stray stderr from requester resolution with unconfigured model #18

Description

@zicochaos

Left over from #16 (noted in PR #17).

packages/agent-core-v2/test/tool/tool.test.ts > "Agent tool description > renders global tool restrictions in subagent type descriptions" logs to stderr:

[unexpected] Error2: Model "mock-model" is not configured in config.toml.
    at ConfigBackedModelCatalog.buildModel (src/kosong/model/catalogService.ts:319)
    at ConfigBackedModelCatalog.entry (src/kosong/model/catalogService.ts:177)
    at ConfigBackedModelCatalog.getRequester (src/kosong/model/catalogService.ts:161)
    at ConfigBackedModelCatalog.getRequester (test/harness/agent.ts:950)

The harness ConfigBackedModelCatalog resolves getRequester('mock-model') against a config that never registered the model; the failure is caught somewhere and logged as [unexpected]. The test passes, so it is noise — but it masks real regressions and pollutes CI output.

Fix direction: either register the model in the test's config so resolution succeeds, or — if the code path is expected to tolerate unconfigured models — stop logging it as unexpected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions