Updated the SDK to handle attachments #minor#9
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Python SDK surface and generated OpenAPI client to support richer agent attachment workflows (discovering attachment selectors, attaching multiple uploads / replaying uploads, and downloading run-emitted attachments), along with a few related API schema expansions (tool calls, model pricing fields, playground experiment deletion) and documentation/tests.
Changes:
- Add SDK convenience methods + tests for agent attachment-reference discovery and downloading agent-run attachments (streaming
httpx.Response). - Extend generated models/spec for multi-upload and replay inputs, run-step tool call metadata, additional model pricing/media fields, and new status enum values.
- Add playground experiment delete endpoint support and update README examples.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_new_methods.py |
Adds sync/async tests for the new attachment and experiment-delete client methods. |
seclai/seclai.py |
Adds high-level SDK methods for attachment references, attachment download (streaming), and experiment deletion; updates insufficient-credits model handling. |
seclai/_generated/models/prompt_model_response.py |
Adds per-modality rates and supported output media fields to the model response schema. |
seclai/_generated/models/pending_processing_completed_failed_status.py |
Adds the waiting_human status enum value. |
seclai/_generated/models/modality_rate_response.py |
New model for per-modality pricing rates. |
seclai/_generated/models/memory_bank_ai_assistant_request.py |
Replaces conversation ID with history_since datetime for assistant context scoping. |
seclai/_generated/models/insufficient_credits_response.py |
New 402 error envelope model. |
seclai/_generated/models/insufficient_credits_detail.py |
New detail payload for insufficient-credits responses. |
seclai/_generated/models/import_skip_response.py |
Docstring tweak to match updated source reference formatting. |
seclai/_generated/models/attachment_refs_source_api_summary.py |
New per-source attachment selector summary model. |
seclai/_generated/models/ai_assistant_generate_request.py |
Adds history_since datetime for assistant generate endpoints. |
seclai/_generated/models/agent_summary_response.py |
Makes trigger_type optional/UNSET in the response model. |
seclai/_generated/models/agent_run_tool_call_response.py |
New model representing a single LLM tool call within a step. |
seclai/_generated/models/agent_run_stream_request.py |
Adds input_upload_ids (multi-upload) and replay_of_run_id to streaming run requests. |
seclai/_generated/models/agent_run_step_response.py |
Adds tool_calls list to step responses. |
seclai/_generated/models/agent_run_response.py |
Adds hitl_wait_ms and output_content_type fields. |
seclai/_generated/models/agent_run_request.py |
Adds input_upload_ids (multi-upload) and replay_of_run_id to non-streaming run requests. |
seclai/_generated/models/agent_definition_response.py |
Updates agent-definition step type list documentation. |
seclai/_generated/models/agent_definition_response_definition.py |
Updates agent-definition step type list documentation. |
seclai/_generated/models/agent_definition_import_error_response.py |
Makes error a required literal constant for invalid-agent-definition responses. |
seclai/_generated/models/agent_attachment_refs_api_response.py |
New response model for attachment-reference contract endpoint. |
seclai/_generated/models/__init__.py |
Exposes newly added generated models. |
seclai/_generated/api/sources/upload_file_to_source_api_sources_source_connection_id_upload_post.py |
Adds image/svg+xml to supported MIME type docs. |
seclai/_generated/api/models/delete_experiment_endpoint_api_models_playground_experiments_experiment_id_delete.py |
New generated endpoint client for experiment deletion. |
seclai/_generated/api/contents/upload_file_to_content_api_contents_source_connection_content_version_upload_post.py |
Adds image/svg+xml to supported MIME type docs. |
seclai/_generated/api/agents/update_agent_definition_api_agents_agent_id_definition_put.py |
Updates agent-definition docs to include if_else and switch semantics. |
seclai/_generated/api/agents/run_streaming_agent_api_agents_agent_id_runs_stream_post.py |
Adds 402 parsing into InsufficientCreditsResponse. |
seclai/_generated/api/agents/run_agent_api_agents_agent_id_runs_post.py |
Adds 402 parsing into InsufficientCreditsResponse. |
seclai/_generated/api/agents/get_agent_definition_api_agents_agent_id_definition_get.py |
Updates agent-definition docs to include if_else/switch constraints. |
seclai/_generated/api/agents/api_upload_agent_input_api_agents_agent_id_upload_input_post.py |
Adds multi-modal routing notes to the upload-input endpoint docs. |
seclai/_generated/api/agents/api_get_agent_attachment_references_api_agents_agent_id_attachment_references_get.py |
New generated endpoint client for attachment-reference contract. |
seclai/_generated/api/agent_run_attachments/serve_agent_run_attachment_api_v2_agent_runs_run_id_attachments_attachment_id_get.py |
New generated endpoint client for downloading agent-run attachments. |
seclai/_generated/api/agent_run_attachments/__init__.py |
New package init for the agent-run-attachments API group. |
README.md |
Documents new attachment-reference and attachment download usage, plus experiment delete example. |
openapi/seclai.openapi.json |
Adds/updates schemas and endpoints for attachments, tool calls, multi-upload inputs, and experiment deletion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.