Skip to content

fix: keep title keys inside OpenAPI singular example values - #12314

Open
LHMQ878 wants to merge 2 commits into
deepset-ai:mainfrom
LHMQ878:fix-keep-title-inside-openapi-example
Open

fix: keep title keys inside OpenAPI singular example values#12314
LHMQ878 wants to merge 2 commits into
deepset-ai:mainfrom
LHMQ878:fix-keep-title-inside-openapi-example

Conversation

@LHMQ878

@LHMQ878 LHMQ878 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to fix: don't strip title when it is a name, not a schema keyword #12219: treat OpenAPI 3.0 singular example as instance data in _DATA_SCHEMA_KEYWORDS, same as examples / default / const / enum.
  • Keeps nested title keys carried via Pydantic json_schema_extra={example: ...} when building tool schemas.
  • Adds a unit fixture that discriminates singular example and a public-API regression through create_tool_from_function.

Context

Flagged by @percymcn on #12219 after re-checking the post-merge 3.1.0.dev build.

Test plan

  • test_remove_title_from_schema_keeps_instance_data passes with singular example
  • test_from_function_with_openapi_example_containing_title_key passes
  • Existing title-stripping controls (items / propertyNames) still remove schema-level title

Follow up deepset-ai#12219: treat OpenAPI 3.0 example the same as examples so nested title keys survive tool schema stripping.

Co-authored-by: Cursor <cursoragent@cursor.com>
@LHMQ878
LHMQ878 requested a review from a team as a code owner August 12, 2026 04:16
@LHMQ878
LHMQ878 requested review from bogdankostic and removed request for a team August 12, 2026 04:16
@LHMQ878
LHMQ878 force-pushed the fix-keep-title-inside-openapi-example branch from de5ce86 to 74ba569 Compare August 12, 2026 04:17
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@LHMQ878 is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/tools
  from_function.py
Project Total  

This report was generated by python-coverage-comment-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant