davsclaus opened a new pull request, #29152: URL: https://github.com/apache/camel/pull/29152
https://issues.apache.org/jira/browse/CAMEL-26572 In the r26 run of the local-model benchmark (qwen3.6, 7 rounds), 12 failed steps of the new example set ended with no accepted write. Each used all 25 calls and sent one catalog lookup 6 to 23 times with the same arguments (r25: 3 such steps). Most of them looked for something the lookup cannot find: 19 filters matched nothing (r25: 4). **What changed** (no change to tool names, arguments or their descriptions, so the tool schema of each request has the same size) - When the `optionsFilter` of a component matches no option, it also searches the component's message headers by name and description. Matching headers come in the shape of `includeHeaders`, exact name first: up to 10 in full, then names only. - `camel_catalog_find` finds a header by its name or its constant (`CamelAwsS3Key`, `AWS2S3Constants.KEY`) when nothing else matches. - When the `optionsFilter` of simple matches none of its functions, it also searches the 15 `file:` functions, with a note on the `${file:...}` form. - A filter that matches nothing on a component, EIP, language or data format gets one line that names where an option or header of that name is (at most 4 places), with the call that shows it. - `CatalogNameIndex`: an index of option and header names, built once per catalog version (about 0.5 s). **The r26 cases, old and new** | Lookup | Before | Now | |---|---|---| | aws2-s3, `optionsFilter=CamelAwsS3Key` (17 calls in one run) | no option matches; closestOptions | "...but 2 message headers do: see headers. A header is not set on the URI: set it on the message before a to: (setHeader), or read it after a from: (${header.CamelAwsS3Key})", with `CamelAwsS3Key` and `CamelAwsS3KeysToDelete` | | find `CamelAwsS3Key` (16 finds in one run) | Nothing in the catalog matches | the header, its component and constant | | simple, `optionsFilter=file:name.noext` | `"functions":[]` | `file:name.noext` and `file:name.noext.single`, and the note on `${file:...}`; `noext` and `name.noext` find it too | | rest component, `optionsFilter=apiContextPath` (23 calls in one run) | no match | "apiContextPath is an option of openApi (eip), restConfiguration (eip), rest-openapi (component) and rest-postman (component): camel_catalog_doc name=<one of them> kind=<its kind> optionsFilter=apiContextPath shows it" | **Answers that already matched are the same.** All 245 distinct catalog lookups of the r26 traces (21 examples) were replayed on the old and the new code. 235 answers are byte-identical: every lookup without a filter, every filter and find that matched, and the ones that still match nothing. The 10 that changed all matched nothing before (one, `simple optionsFilter=file:`, matched an option but no function, and now also lists the file functions). **Sizes:** the longest answer with headers, over all 4,133 header-name and header-prefix filters of the catalog, is 15,799 characters (keycloak). The longest "where it is" line is 310 characters; the longest find answer with a header is 4,568. **Tests** - New `CatalogLookupsTest` (4 tests); they fail on the old code. - camel-jbang-core `commands/ai` package: 860 run, no failures, 1 skipped as before. **Not in this change** - `includeHeaders=true` on aws2-s3 is still cut to 3 of 54 headers by the size cap. The cut note could name the headers it left out. - `camel_catalog_find` does not split words, so "aws2-s3 header KEY" still finds nothing. - A header whose name is in the description of one of its component's options (5% of headers, e.g. `JMSCorrelationID` on jms) still gets the matching options, not the header. Related: CAMEL-25639 (consolidation of the tool surface). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
