[S3] File resource gaps: no delete(), url None after save(), download(destination) required, bad mime fallback, SplittingOptions dead export · Issue #1126 · aixplain/aiXplain · GitHub
Skip to content

[S3] File resource gaps: no delete(), url None after save(), download(destination) required, bad mime fallback, SplittingOptions dead export #1126

Open

Description

@aix-ahmet

Source: external black-box user audit of PyPI aixplain 0.2.48 (findings additional minor issues (files)). Verified offline against development @ e9f7061; the aixplain/ package there is byte-identical to main/0.2.48, so this is present on all branches.

Problems (verified on development)

  • aix.File has no delete() (file.py:44 lacks DeleteResourceMixin), so a wrongly uploaded file cannot be retracted through the SDK while is_temp presigned URLs stay anonymously readable for 14 days.
  • File.url is None after save(): _save_file (file.py:232-246) has the reference download URL in hand but _apply_data overwrites from a POST echo that lacks url.
  • File.download(self, destination) is required while the sibling Skill.download(self, file_path=None) is optional (file.py:406 vs skill.py:294).
  • validate_file_for_upload("plain.zzq") returns {'mime_type': 'text/csv', 'valid': True} from the upload_utils.py:92 fallback.
  • SplittingOptions is in aixplain.v2.__all__ (v2/__init__.py:190) but referenced only by v1 index_model.py; no v2 call site accepts it.

Suggested fix

Add DeleteResourceMixin to File (backend supports delete); set self.url = reference in _save_file; make destination optional defaulting to ./{name}; fall back to application/octet-stream; remove SplittingOptions from v2 exports.

Activity

  1. added
    bugSomething isn't working
    severity-3Medium/low: papercuts, docs, robustness
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingseverity-3Medium/low: papercuts, docs, robustness

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions