Skip to content

List models using open ai api #1234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

agrimk
Copy link
Member

@agrimk agrimk commented Jul 22, 2025

Description

  • Add a new handler in AQUA SDK to call /predict/v1/models and return the deployed model list.
  • this is called from AQUA UI via the following format -
    BASEURL/aqua/deployments/models/list/<md_ocid>

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 22, 2025
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-18.59%

headers = {"Content-Type", "application/json"}
response = self._client.get(self.endpoint, headers=headers, json={}).json()
json_response = response.json()
logger.debug(f"Response JSON: {json_response}")
Copy link
Member

Choose a reason for hiding this comment

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

If we want to keep this debug statement, we should be more specific in the message.

for key, default in config_keys.items()
if key in additional_configurations
]
env_vars_dict = json.loads(
Copy link
Member

Choose a reason for hiding this comment

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

Why these changes are here? This will override the changes made in another PR.

self.set_header("Content-Type", "application/json")

model_deployment = AquaDeploymentApp().get(model_deployment_id)
endpoint = model_deployment.endpoint + "/predict/v1/models"
Copy link
Member

Choose a reason for hiding this comment

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

SHouldn't we check if the endpoint already contains a "/" at the end?

Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-18.59%

Copy link

📌 Cov diff with main:

Coverage-25%

📌 Overall coverage:

Coverage-58.47%

Copy link

📌 Cov diff with main:

Coverage-21%

📌 Overall coverage:

Coverage-58.46%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants