-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enhance API documentation and improve model structure #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit significantly improves the documentation for the agent selection process and backup operations within the robosystems client. Key updates include detailed descriptions of the agent selection criteria, execution modes, confidence score interpretation, and credit costs. Additionally, the backup creation and restoration processes now include an operation state machine and expected durations based on database size. Key Changes: - **Agent Selection Documentation**: Expanded details on agent types, selection process, and use cases. - **Backup Operations Documentation**: Introduced operation state machine and expected durations for backup and restore processes. - **Code Cleanup**: Removed outdated response models to streamline the codebase. Testing Notes: - Verify that the updated documentation accurately reflects the API behavior and is accessible to users. - Ensure that all affected endpoints function correctly with the new documentation. This enhancement aims to improve developer experience and facilitate better understanding of the API functionalities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| *, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
| ) -> Optional[Union[Any, HTTPValidationError]]: | ||
| if response.status_code == 200: | ||
| content_type = response.headers.get("content-type", "") | ||
| if ( | ||
| "application/x-ndjson" in content_type | ||
| or response.headers.get("x-stream-format") == "ndjson" | ||
| ): | ||
| return None | ||
| response_200 = response.json() | ||
| return response_200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove NDJSON guard in Cypher query parser
The 200‑status branch now unconditionally calls response.json() and returns the parsed payload. The earlier NDJSON check was removed, so streaming queries that return application/x-ndjson (or x-stream-format=ndjson) will raise a JSONDecodeError before the caller can consume the stream. This breaks the streaming mode that previously worked by bypassing JSON parsing and returning None.
Useful? React with 👍 / 👎.
…dling This commit simplifies the SDK generation process by delegating the task to a dedicated script, improving maintainability. Additionally, it enhances the response handling in `execute_cypher_query.py` to include a new response model, `ExecuteCypherQueryResponse200`, ensuring better type safety and clarity in response parsing. Key Changes: - **SDK Generation**: Replaced inline SDK generation commands with a call to `bin/generate-sdk`. - **Response Handling**: Updated `_parse_response` and related functions to accommodate the new response model, improving robustness against different content types. Testing Notes: - Verify that the SDK generation works as expected with the new script. - Ensure that the updated response handling correctly processes various response formats, including NDJSON.
|
@claude can you review the improvements to fix the sdk generation issue that kept removing the ndjson response type |
|
Claude finished @jfrench9's task —— View job Review of NDJSON Response Type FixesAfter analyzing the changes, I can see significant improvements to the SDK generation process and NDJSON handling. Here's my comprehensive review: Todo List:
✅ Positive Improvements1. Excellent SDK Generation StrategyThe new
2. Proper NDJSON Detection LogicThe NDJSON handling in
3. Enhanced Type Safety
|
Summary
This PR significantly enhances the API documentation and restructures models for better maintainability and clarity across agent selection, backup operations, and graph management functionalities.
Key Accomplishments
📚 Enhanced API Documentation
🏗️ Model Structure Improvements
New Limit Models: Introduced granular limit models for better organization:
backup_limits.py- Backup-specific limitationscredit_limits.py- Credit system constraintsquery_limits.py- Query execution limitsrate_limits.py- API rate limiting parametersstorage_limits.py- Storage capacity constraintscopy_operation_limits.py- Data copy operation limitsResponse Model Refactoring: Replaced verbose auto-generated model names with cleaner, more intuitive alternatives:
backup_download_url_response.pyreplaces the lengthy auto-generated equivalentgraph_limits_response.pyprovides clearer structure for limit information🚀 New Features
get_available_graph_tiers.pyendpoint for retrieving available graph tier options🔧 Code Quality Improvements
__init__.pyBreaking Changes
Testing Notes
Infrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
chore/improve-documentationmainCo-Authored-By: Claude noreply@anthropic.com