[DOCS] Python SDK reference has malformed function signatures (strparam, Params**kwargs)

Resolved 💬 2 comments Opened Jan 25, 2026 by coygeek Closed Mar 1, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://platform.claude.com/docs/en/api/python/models/retrieve

Section/Topic

Function signature headers throughout the Python SDK reference

Current Documentation

The documentation shows malformed signatures like:

models.retrieve(strmodel_id, ModelRetrieveParams**kwargs) -> ModelInfo
beta.files.delete(strfile_id, FileDeleteParams**kwargs) -> DeletedFile
beta.skills.delete(strskill_id, SkillDeleteParams**kwargs) -> SkillDeleteResponse

What's Wrong or Missing?

A. Type concatenated with parameter name

The type str is concatenated with the parameter name without spacing:

  • strmodel_id should be model_id: str
  • strfile_id should be file_id: str
  • strskill_id should be skill_id: str

B. Kwargs type concatenated without separator

The typed kwargs are concatenated without proper syntax:

  • ModelRetrieveParams**kwargs should be **kwargs: Unpack[ModelRetrieveParams] or at minimum **kwargs

This creates invalid Python syntax and makes the reference confusing to read.

Suggested Improvement

Update the documentation generator to produce proper type hinting syntax:

Before:

models.retrieve(strmodel_id, ModelRetrieveParams**kwargs)  -> ModelInfo

After:

models.retrieve(model_id: str, **kwargs: Unpack[ModelRetrieveParams]) -> ModelInfo

Or minimally:

models.retrieve(model_id: str, **kwargs) -> ModelInfo

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Signature |
|------|---------|-----------|
| https://platform.claude.com/docs/en/api/python/models/retrieve | 3 | strmodel_id |
| https://platform.claude.com/docs/en/api/python/models | 115 | strmodel_id |
| https://platform.claude.com/docs/en/api/python/beta/models/retrieve | 3 | strmodel_id |
| https://platform.claude.com/docs/en/api/python/beta/files/delete | 3 | strfile_id |
| https://platform.claude.com/docs/en/api/python/beta/files/download | 3 | strfile_id |
| https://platform.claude.com/docs/en/api/python/beta/files/retrieve_metadata | 3 | strfile_id |
| https://platform.claude.com/docs/en/api/python/beta/skills/delete | 3 | strskill_id |
| https://platform.claude.com/docs/en/api/python/beta/skills/retrieve | 3 | strskill_id |
| https://platform.claude.com/docs/en/api/python/beta/skills/versions/create | 3 | strskill_id |
| https://platform.claude.com/docs/en/api/python/beta/skills/versions/list | 3 | strskill_id |
| https://platform.claude.com/docs/en/api/python/beta/skills/versions/retrieve | 3 | strversion |
| https://platform.claude.com/docs/en/api/python/beta/skills/versions/delete | 3 | strversion |
| https://platform.claude.com/docs/en/api/python/beta/messages/batches/retrieve | 3 | strmessage_batch_id |
| https://platform.claude.com/docs/en/api/python/beta/messages/batches/cancel | 3 | strmessage_batch_id |
| https://platform.claude.com/docs/en/api/python/beta/messages/batches/delete | 3 | strmessage_batch_id |
| https://platform.claude.com/docs/en/api/python/beta/messages/batches/results | 3 | strmessage_batch_id |

Total scope: 50+ occurrences across 23 files. This is a systemic issue in the documentation generator.

Pattern searched: str[a-z_]+,.*Params\*\*kwargs

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗