Skip to content

Conversation

@jcabrero
Copy link
Member

@jcabrero jcabrero commented Sep 2, 2025

This PR adds model settings to enable using the model settings to define for how long a model waits and how many retries it does.

Also, if num_retries == - 1 then the number of retries is infinite

@jcabrero jcabrero requested a review from Copilot September 2, 2025 14:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces configurable model settings for retry behavior and timeout handling. The changes enable configuring how many retries a model performs and how long it waits between retries, with support for infinite retries when num_retries is set to -1.

  • Added ModelSettings class with configurable retry count and timeout parameters
  • Updated model metadata fetching to use centralized settings instead of hardcoded values
  • Exported new settings through the common package interface

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/nilai-common/src/nilai_common/config.py Defines ModelSettings class and creates MODEL_SETTINGS instance with environment variable support
packages/nilai-common/src/nilai_common/init.py Exports MODEL_SETTINGS to make it available for other packages
nilai-models/src/nilai_models/daemon.py Updates get_metadata function to use configurable settings instead of hardcoded retry and timeout values

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jcabrero jcabrero requested a review from blefo September 2, 2025 15:31
@jcabrero jcabrero force-pushed the feat/env_model_settings branch from 1deccff to 05dde87 Compare September 2, 2025 15:37
@jcabrero jcabrero merged commit e278d06 into main Sep 2, 2025
8 checks passed
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.

3 participants