FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

custom models CRUD for SDK by Sofistika · Pull Request #10 · lightonai/lighton-python-sdk · GitHub

custom models CRUD for SDK - #10

Open
Sofistika wants to merge 1 commit into
lightonai:mainfrom
Sofistika:feat/company-models
Open

custom models CRUD for SDK#10
Sofistika wants to merge 1 commit into
lightonai:mainfrom
Sofistika:feat/company-models

Conversation

Copy link
Copy Markdown

Adds CompanyModel, an SDK resource for managing a company's custom LLM registrations.

Until now the SDK had no way to reach them: the only way to use one was to hardcode its technical name (custom-{company_id}-{uuid}) into an ask() call. There was no way to discover what was registered, inspect it, or change it without leaving Python. CompanyModel covers the full lifecycle against /api/v3/company/models: list, get, create, save and delete. It follows the same active-record pattern as ApiKey, so it inherits list/get/refresh/delete and adds create() and save(). Reading is open to any member of the company; creating, updating and deleting require the Company Admin role and raise PermissionDeniedError otherwise.

Three server behaviours are handled explicitly: litellm_model, endpoint and api_key are fixed at creation (the API ignores attempts to change them rather than rejecting them), api_key is write-only and never returned, and the collection endpoint returns a bare array rather than a paginated envelope.

tdurey-lighton self-requested a review August 20, 2026 14:47

tdurey-lighton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, but we need to wait for the activation on the feature on prod

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL