Skip to content

docs: clean up class docstrings in agents, models, memories#3880

Open
iFiras-Max1 wants to merge 6 commits intocamel-ai:masterfrom
iFiras-Max1:fix/docstring-cleanup
Open

docs: clean up class docstrings in agents, models, memories#3880
iFiras-Max1 wants to merge 6 commits intocamel-ai:masterfrom
iFiras-Max1:fix/docstring-cleanup

Conversation

@iFiras-Max1
Copy link
Copy Markdown

Noticed several classes across core modules had inconsistent or missing docstrings while reading through the codebase. This cleans them up to follow the project's format from #911.

What changed:

  • Moved Args from __init__ to class-level docstrings where they were duplicated (KnowledgeGraphAgent, MCPAgent)
  • Replaced Attributes with Args for constructor parameters (RepoAgent, MemoryRecord, etc.)
  • Fixed :str: references to use :obj: consistently (MCPAgent, ModelManager)
  • Added missing class docstrings (ProcessingMode, StubTokenCounter, ContextRecord)
  • Added Args sections to classes that were missing them (BaseAudioModel, OpenAIAudioModels, StubModel)

Files: 9 files across agents/, models/, memories/

No logic changes — docstrings only.

Relates to #911

Move Args from __init__ to class-level docstrings,
replace Attributes with Args where needed, and fix
:str: references to use :obj: consistently.

Part of camel-ai#911
- stub_model: add class docstrings for StubTokenCounter and StubModel
- model_manager: fix :str: -> :obj: in scheduling_strategy default
- base_audio_model: add Args section
- openai_audio_models: add Args section

Part of camel-ai#911
Replace Attributes with Args, add missing default values,
and expand ContextRecord docstring.

Part of camel-ai#911
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 27, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7923a7d6-9048-4ca3-85a1-291c26595e60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Collaborator

@fengju0213 fengju0213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !@iFiras-Max1
We'd better stay completely consistent with the original annotations.

- Reverted docstring rewrites in agents/ — keeping original text as-is per review
- Reverted Attributes → Args renames (stays consistent with existing style)
- Kept new Args sections where none existed (audio models, stub, records)
- Kept :str: → :obj: fix in model_manager
- Added missing docstrings for StubTokenCounter and ProcessingMode
@iFiras-Max1
Copy link
Copy Markdown
Author

Thanks @fengju0213 .. fair point, I went too far with the rewrites.

Scoped it down now:

  • Reverted all changes in agents/ — original annotations stay as-is
  • Kept only new Args sections where they were missing (BaseAudioModel, OpenAIAudioModels, StubModel, ContextRecord)
  • Kept the :str::obj: fix in ModelManager

No original text touched anymore.. just additions.

@iFiras-Max1
Copy link
Copy Markdown
Author

@Wendong-Fan I've updated the PR based on the review — scoped it down to additions only. Ready for another look whenever you're free!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants