Fix: Handled AgentCardBuilder field inconsistencies #2099
+10
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR makes a few small improvements to the experimental Agent Card Builder feature:
AgentCard
andAgentSkill
fields to use snake_case instead of camelCase, in line with the project's conventions.doc_url
field, which is not defined in theAgentCard
model todocumentation_url
.Rationale
Although this feature is still experimental, these changes help improve consistency and clarity:
The models currently allow camelCase access only for backwards compatibility and issue a deprecation warning when used. These aliases are planned to be removed in version 0.3.0. Updating to snake_case ensures the code aligns with the intended usage and avoids deprecation warnings. Below is the corresponding code from a2a-sdk.
Since
doc_url
isn’t a valid field onAgentCard
, replacing it withdocumentation_url
helps prevent confusion and ensures only supported fields are used.I have also updated the unit tests to ensure they correctly reflect the current model structure and remain reliable over time.
These are relatively minor changes, but I hope they help keep the codebase clean and aligned with the project's direction. Feedback is always welcome.