Repository navigation
docs: describe gen_ai.tool.definitions in the conventions' shape - #114
Conversation
The SDKs now record tool definitions as conventions function tools, with provider built-in tool types prefixed by the provider, instead of the provider's own shape. The rationale said verbatim.
Automated reviewNo blocking issues. The change is rationale text only. The generated Nits
|
Bedrock toolSpec and Gemini function declarations are now converted too. A built-in tool without a name stays without one on purpose, and a shape the SDKs do not recognise is recorded as given.
|
Addressed in ec2225e. The rationale no longer claims every spelling is converted. It lists the recognised function-tool spellings, which now include Bedrock Not changed here: the CONTENT_ATTRIBUTES deviation from upstream #543 for tool definitions is tracked separately. The expected-results re-sync after the SDK release still stands as described in the body. |
The rationale of
gen_ai.tool.definitionssaid definitions are "serialized verbatim". Both SDKs now record them in the conventions' shape (semantic-conventions-genai #608) where they recognise the provider's spelling: a function tool from OpenAI, Anthropic, Bedrock (toolSpec), Gemini (function declarations) or the Vercel AI SDK becomes{type: "function", name, description, parameters}, and a provider's built-in tool keeps its fields with itstypeprefixed by the provider name (anthropic.web_search_20250305). The rationale now says so, and says two limits:web_search, Gemini'sgoogle_search) stays nameless on purpose. An invented name would read as a tool that was offered and never called.Rationale text only;
out/,model/anddocs/registry/regenerated from it (check_registry,generators.generate --check,generators.registry_docs --checkclean;pytest1171 passed).SDK PRs: glassflow/rius-sdk-python#286, glassflow/rius-sdk-typescript#251.
Not in this PR: the shared fixtures' expected results still hold the provider shapes for
gen_ai.tool.definitions(12 OpenInference families, plusvercel-ai-v5/v6on the TypeScript side). They need regenerating withtools/expect_python.py/tools/expect_typescript.mtsonce the SDK change is released; both SDKs list them as known differences until then.Related: RIUS-1879