Add optional model doc slug field#479
Conversation
|
|
9211785 to
d0a08f7
Compare
|
@mdeyell-valid-mind there are some "ghost" changes on some notebooks? |
I had to run |
Plan of action recommended
Post-merge
Additional context: after all of this is done, there is another major task we'll work on:
|
95247b0 to
19cacc7
Compare
19cacc7 to
1a0ca34
Compare
cachafla
left a comment
There was a problem hiding this comment.
Looking good!
For the deprecation message I'd tag @validbeck @nrichers for suggestions:
2026-02-20 15:47:09,780 - ERROR(validmind.api_client): Not providing `model_document` to `vm.init()` is deprecated and will become required in a future release.
@mdeyell-valid-mind doing some tests, I'm unable to send data for custom docs.
I'm sending:
model_document="my-custom-doc",
For a new doc I created. The library sees:
APIRequestError: User does not have permission to access document 'my-custom-doc'.
The backend prints:
has_permission: False
required_permission: update_dt_my-custom-doc
user_model_roles: [Role:ABC Banking:Model Owner, Role:ABC Banking:Model Developer]
Then, I looked into the role permissions and saw this:
Permission:ABC Banking:Model Owner:read_dt_cybersecurity-assessment,
Permission:ABC Banking:Model Owner:update_dt_cybersecurity-assessment,
Ok, this makes perfect sense:
- The user has write permissions over
cybersecurity-assessmentdocs
However, note that document slugs != document type slugs. It's possible that a user can create more than one document for type (slug) documentation. When this is the case we create unique slugs for every new doc and this is automatically handled by the UI:
What this means is that the library is doing things correctly, but the backend should retrieve the document type for the given document slug, and then check if the role permissions exists for that document type.
In my case the single document slug is my-custom-doc but it is a document of type cyber security assessment:
Good point, i will update the backend on monday |
|
@mdeyell-valid-mind late request: I realized that we should rename the parameter to |
|
Got it, I will update the library and frontend
… On Feb 23, 2026, at 08:54, Andres Rodriguez ***@***.***> wrote:
cachafla
left a comment
(validmind/validmind-library#479)
<#479 (comment)>
@mdeyell-valid-mind <https://github.com/mdeyell-valid-mind> late request: I realized that we should rename the parameter to document instead of model_document. As we continue working on the AI governance roadmap (and introduce primary records as a general container of documents) we can't assume that all records are Models.
—
Reply to this email directly, view it on GitHub <#479 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BRP3CIEJMSYECVP6ZIEJM634NMWFZAVCNFSM6AAAAACVOXFGVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNBVHE4TCOJZGI>.
You are receiving this because you were mentioned.
|
9c7e84c to
82e74b0
Compare
PR SummaryThis PR augments the ValidMind codebase by introducing a new, optional parameter named Key changes include:
Overall, these changes aim to make the documentation type more explicit and configurable, improving flexibility and future compatibility with upcoming releases of the ValidMind Library. Test Suggestions
|


Pull Request Description
What and why?
We need to allow users to specify which document they want to interact with.
I updated the existing notebooks to specify a document slug.
https://app.shortcut.com/validmind/story/14764/update-library-to-include-model-document-slug-field
How to test
I ran this locally and verified that
X-DOCUMENT-TYPEis received and processed by the backend.To test full integration, this backend pr needs to be checked out https://github.com/validmind/backend/pull/2677
along with this frontend pr https://github.com/validmind/frontend/pull/2222
What needs special review?
Dependencies, breaking changes, and deployment notes
Release notes
init() now supports an optional
documentparameter that is used to specify which document we would like to connect the library to. In a future release, this field will become required.The document parameter is determined by the url
model-inventory/cmkel544f00ef8mk318l3j533/documents/new-validation-report/overviewFor instance in this url, the document parameter is
new-documentation-reportChecklist