[S3] Misc v2 papercuts: RLM.save() Cannot PUT, run_async loses default action, Skill in tools= rejected, bare JSON/KeyError, no blocked-run helper · Issue #1127 · aixplain/aiXplain · GitHub
Skip to content

[S3] Misc v2 papercuts: RLM.save() Cannot PUT, run_async loses default action, Skill in tools= rejected, bare JSON/KeyError, no blocked-run helper #1127

Open

Description

@aix-ahmet

Source: external black-box user audit of PyPI aixplain 0.2.48 (findings additional minor issues). 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)

  • RLM.save() -> Cannot PUT /<uuid>: rlm.py:709 RESOURCE_PATH = "", id is uuid4() (:794), no save/delete override, while run_async/run_stream raise a clean NotImplementedError (:2019-2025).
  • A Metric/Tool with a single-action integration and empty allowed_actions: run() auto-picks the action (tool.py:553-555) but run_async/run_stream go through _merge_with_dynamic_attrs (tool.py:564-572) which only consults allowed_actions -> ValueError: No action provided.
  • Skill.as_tool() emits type="skill"; that is the correct serialiser for skills= (agent.py:2156-2170), but passing a Skill in tools= routes it through ToolableMixin (agent.py:1697-1698) and the backend rejects tools.0.type must be one of: model, pipeline, utility, sql, script, tool, integration. Either route Skill instances in tools= into skills, or raise a clear error.
  • handle_run_response/poll assume a dict body (resource.py:1921-1922, 2121-2135) and client.py:685 response.json() can raise a bare JSONDecodeError; a non-dict 200 body raises AttributeError instead of APIError.
  • governance.status = BLOCKED_BY_INSPECTOR arrives with status=SUCCESS, completed=True (backend-defined); a caller branching on status treats a blocked run as a normal answer. SDK could add a result.blocked convenience property.
  • Module-level Skill(...)/Agent(...) (not via aix.) fail with ResourceError: ... 'NoneType' object has no attribute 'client'; a clearer "resource not bound to an Aixplain context" message would help.
  • CLI has no --version (cli_groups.py:36-37).

Suggested fix

One small PR per bullet; each has a one-line fix noted above.

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