Skip to content

feat(core): add per-model retry config to WorkerRegistry - #821

Merged
CatherineSue merged 6 commits into
mainfrom
feat/per-group-retry-config
Mar 24, 2026
Merged

CatherineSue merged 6 commits into
mainfrom
feat/per-group-retry-config

Conversation

@CatherineSue

@CatherineSue CatherineSue commented Mar 19, 2026 •

Copy link
Copy Markdown
Member

Description

Part of the per-worker resilience refactor series: #799 → #803 → #811 → this PR → router migration → cleanup.

Problem

Retry config is global — all routers store a single retry_config from RouterConfig. Different worker groups (e.g., local SGLang vs external OpenAI) have different retry characteristics but share the same config.

Solution

Store per-model retry config in WorkerRegistry using last-write-wins semantics. When a worker registers with non-empty retry overrides in WorkerSpec.resilience, its resolved RetryConfig is stored for the model group. Subsequent workers with retry overrides overwrite it. Workers with no overrides don't change the stored config.

Retry config is cleaned up when the last worker for a model is removed.

This follows the same pattern as PolicyRegistry (per-model policy) but lives in WorkerRegistry to avoid a separate registry. Routers will look up retry config from the registry at request time in a subsequent PR.

Design decision: retry at router level, not per-worker

Retries re-select workers on each attempt (like Envoy/NGINX), so retry config belongs to the worker group, not individual workers. See updated design doc at .claude/docs/plans/2026-03-14-per-worker-resilience-design.md.

Changes

  • Add model_retry_configs and model_retry_enabled DashMaps to WorkerRegistry
  • Add get_retry_config(), get_retry_enabled(), set_model_retry_config() methods
  • Wire retry config storage into RegisterWorkersStep — stores resolved config when worker has non-empty retry overrides
  • Clean up retry config in remove_worker_from_model_index() when last worker is removed
  • 2 new tests: last-write-wins semantics and cleanup on last worker removal

Test Plan

  • cargo test -p smg --lib core::worker_registry — all 8 tests pass (6 existing + 2 new)
  • cargo test -p smg --lib — all 437 tests pass, 0 failures
  • Pre-commit hooks pass (rustfmt, clippy, codespell, DCO)
Checklist
  • cargo +nightly fmt passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • (Optional) Documentation updated
  • (Optional) Please join us on Slack #sig-smg to discuss, review, and merge PRs

Summary by CodeRabbit

  • New Features
    • Per-model retry configuration added with customizable policies (max attempts, backoff timing, multiplier, jitter, enable/disable).
    • Workers can supply per-model retry overrides; when multiple workers target the same model, the most recent override takes effect.
    • Registry APIs added to read and set per-model retry config and enabled state.
  • Tests
    • Unit tests covering last-write-wins behavior and cleanup of retry state when a model loses its final worker.

Summary by CodeRabbit

@CatherineSue
CatherineSue requested a review from slin1237 as a code owner March 19, 2026 16:30
@coderabbitai

coderabbitai Bot commented Mar 19, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds per-model retry override storage and APIs to WorkerRegistry and updates the worker registration step to apply per-worker retry overrides to each model a worker serves (sequential last-write-wins when multiple workers target the same model IDs).

Changes

Cohort / File(s) Summary
Register Step
model_gateway/src/core/steps/worker/shared/register.rs
After registering/replacing workers, iterate workers and, when metadata contains retry overrides, resolve resilience, clone resolved.retry, compute target model IDs, and call set_model_retry_config(model_id, retry, enabled) for each model.
Worker Registry
model_gateway/src/core/worker_registry.rs
Add per-model retry stores (model_retry_configs, model_retry_enabled) and public APIs get_retry_config(), get_retry_enabled(), set_model_retry_config(). Use last-write-wins inserts and remove per-model overrides when the last worker for that model is removed. Add unit tests for overwrite and cleanup behavior.

Sequence Diagram(s)

sequenceDiagram
  participant Registrar as Register Step
  participant Worker as Worker (metadata/resilience)
  participant Registry as WorkerRegistry

  Registrar->>Worker: iterate registered workers
  Worker-->>Registrar: metadata(), resilience(), worker_model_ids()
  Registrar->>Registry: set_model_retry_config(model_id, retry_config, enabled)
  Registry-->>Registrar: store/overwrite per-model retry state
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • lightseekorg/smg#756: Per-model indexing and worker_model_ids/add/remove helpers used by these changes.
  • lightseekorg/smg#799: Adds resilience override types and resolved retry structures referenced by the register step.
  • lightseekorg/smg#803: Wires per-worker resilience accessors (e.g., worker.resilience()) used when applying per-worker retry overrides.

Suggested reviewers

  • key4ng
  • slin1237

Poem

🐰 I hopped through code with a tiny cheer,
I shelved retries for models far and near.
Workers whispered resilience, I penned each line,
Last-write-wins beneath a moonlit sign.
Registry snug — I nibble, nudge, and shine.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(core): add per-model retry config to WorkerRegistry' accurately captures the main change—adding per-model retry configuration storage to WorkerRegistry with new public methods.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/per-group-retry-config

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the system's resilience by introducing granular, per-model retry configuration capabilities. Previously, retry settings were applied globally, which was insufficient for diverse worker groups. The changes enable the system to store and manage distinct retry policies for individual models, ensuring that each model's specific requirements are met. This is a foundational step towards a more robust and adaptable worker resilience framework, allowing for tailored retry behavior based on the characteristics of different models.

Highlights

  • Per-Model Retry Configuration: Introduced the ability to store and manage retry configurations on a per-model basis within the WorkerRegistry, moving away from a global retry config.
  • Last-Write-Wins Semantics: Implemented a 'last-write-wins' mechanism for per-model retry configurations, where the retry settings from the most recently registered worker with overrides for a given model will take precedence.
  • Dynamic Configuration Updates: Integrated the logic to update these per-model retry configurations during the worker registration process in RegisterWorkersStep when a worker specifies non-empty resilience overrides.
  • Automatic Cleanup: Ensured that per-model retry configurations are automatically removed from the WorkerRegistry when the last worker associated with that model is unregistered.
  • New Tests: Added two new unit tests to validate the 'last-write-wins' behavior and the cleanup mechanism for per-model retry configurations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request effectively implements per-model retry configuration within the WorkerRegistry, addressing the need for differentiated retry characteristics across various worker groups. The solution follows a clear last-write-wins semantic and includes proper cleanup when workers are removed. The changes are well-tested with new unit tests covering the core logic. The code is clean, readable, and integrates smoothly with the existing architecture.

@github-actions github-actions Bot added the model-gateway Model gateway crate changes label Mar 19, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@model_gateway/src/core/steps/worker/shared/register.rs`:
- Around line 56-74: The loop only iterates worker.models() so workers that only
expose a model via worker.model_id() (labels) never get their retry config
saved; replace the iteration with the same fallback used by
WorkerRegistry::worker_model_ids (or call WorkerRegistry::worker_model_ids) to
obtain model IDs for the worker, then call
app_context.worker_registry.set_model_retry_config(model_id,
resolved.retry.clone(), resolved.retry_enabled) for each returned id; use
worker.resilience() to get resolved.retry and resolved.retry_enabled as shown.
- Around line 66-72: The loop repeatedly calls resolved.retry.clone() for each
model; compute let retry_cfg = resolved.retry.clone() once before iterating
(using worker.resilience() result already in resolved) and pass retry_cfg (and
resolved.retry_enabled) into app_context.worker_registry.set_model_retry_config
inside the for loop so you avoid redundant clones while preserving behavior of
worker.resilience(), worker.models(), and set_model_retry_config.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bc6bdb75-1fce-4805-8c43-eed6fbb3128e

📥 Commits

Reviewing files that changed from the base of the PR and between fa2b4dc and 73fcff4.

📒 Files selected for processing (2)
  • model_gateway/src/core/steps/worker/shared/register.rs
  • model_gateway/src/core/worker_registry.rs

Comment thread model_gateway/src/core/steps/worker/shared/register.rs
Comment thread model_gateway/src/core/steps/worker/shared/register.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 73fcff4e8e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +298 to +302
pub fn set_model_retry_config(&self, model_id: &str, config: RetryConfig, enabled: bool) {
self.model_retry_configs
.insert(model_id.to_string(), config);
self.model_retry_enabled
.insert(model_id.to_string(), enabled);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Key retry overrides by full worker group

If the same model is exposed by more than one backend group, this key is too coarse. WorkerSelection::get_candidates() still partitions candidates by worker_type, connection_mode, runtime_type, and optional provider, so a local SGLang gpt-4o worker and an external OpenAI gpt-4o worker can coexist. With only model_id here, whichever worker registers last overwrites the other's retry policy, so a later lookup cannot return the retry settings for the group that was actually selected.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Valid concern — matches how PolicyRegistry works today (also keyed by model_id only). This is part of the broader WorkerGroup consolidation planned as future work. Keeping consistent with the existing pattern for now.

Comment thread model_gateway/src/core/worker_registry.rs Outdated
Comment thread model_gateway/src/core/steps/worker/shared/register.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@model_gateway/src/core/worker_registry.rs`:
- Around line 296-303: set_model_retry_config currently does two separate
inserts into model_retry_configs and model_retry_enabled which can interleave
under concurrent writes; replace the two DashMaps with a single DashMap keyed by
model_id that stores a combined value (e.g., a small struct or tuple containing
RetryConfig and enabled flag) and update set_model_retry_config to perform one
atomic insert into that single map (references: set_model_retry_config,
model_retry_configs, model_retry_enabled, RetryConfig); also update any read
sites to access the combined value and adjust types accordingly so
config+enabled are always updated together.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1c8c7323-878d-4890-8862-9c77d3534042

📥 Commits

Reviewing files that changed from the base of the PR and between dcb7f82 and d51eb24.

📒 Files selected for processing (2)
  • model_gateway/src/core/steps/worker/shared/register.rs
  • model_gateway/src/core/worker_registry.rs

Comment thread model_gateway/src/core/worker_registry.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d51eb2468b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread model_gateway/src/core/steps/worker/shared/register.rs
Comment thread model_gateway/src/core/worker_registry.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
model_gateway/src/core/worker_registry.rs (1)

296-303: ⚠️ Potential issue | 🟠 Major

Config and enabled flag updates are non-atomic across two maps.

At Line 299-302, set_model_retry_config writes RetryConfig and enabled in separate operations. Concurrent updates for the same model_id can leave a mixed pair (config from writer A, enabled from writer B), which breaks strict per-write last-write-wins semantics.

💡 Proposed refactor: store a single combined value per model
+#[derive(Debug, Clone)]
+struct ModelRetrySettings {
+    config: RetryConfig,
+    enabled: bool,
+}
@@
-    model_retry_configs: Arc<DashMap<String, RetryConfig>>,
-    model_retry_enabled: Arc<DashMap<String, bool>>,
+    model_retry_settings: Arc<DashMap<String, ModelRetrySettings>>,
@@
-            model_retry_configs: Arc::new(DashMap::new()),
-            model_retry_enabled: Arc::new(DashMap::new()),
+            model_retry_settings: Arc::new(DashMap::new()),
@@
-            model_retry_configs: self.model_retry_configs.clone(),
-            model_retry_enabled: self.model_retry_enabled.clone(),
+            model_retry_settings: self.model_retry_settings.clone(),
@@
     pub fn get_retry_config(&self, model_id: &str) -> Option<RetryConfig> {
-        self.model_retry_configs
-            .get(model_id)
-            .map(|entry| entry.value().clone())
+        self.model_retry_settings
+            .get(model_id)
+            .map(|entry| entry.value().config.clone())
     }
@@
     pub fn get_retry_enabled(&self, model_id: &str) -> Option<bool> {
-        self.model_retry_enabled
-            .get(model_id)
-            .map(|entry| *entry.value())
+        self.model_retry_settings
+            .get(model_id)
+            .map(|entry| entry.value().enabled)
     }
@@
     pub fn set_model_retry_config(&self, model_id: &str, config: RetryConfig, enabled: bool) {
-        self.model_retry_configs
-            .insert(model_id.to_string(), config);
-        self.model_retry_enabled
-            .insert(model_id.to_string(), enabled);
+        self.model_retry_settings.insert(
+            model_id.to_string(),
+            ModelRetrySettings { config, enabled },
+        );
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@model_gateway/src/core/worker_registry.rs` around lines 296 - 303,
set_model_retry_config currently updates model_retry_configs and
model_retry_enabled in two separate operations which can interleave; change to a
single atomic update by storing a combined value instead of two maps or by
performing both writes under the same lock. Concretely, introduce a small struct
(e.g., ModelRetry { config: RetryConfig, enabled: bool }) and replace
model_retry_configs/model_retry_enabled with a single map keyed by model_id,
then update set_model_retry_config to insert that combined struct in one
operation (or wrap the two inserts in the same mutex/critical section if
retaining two maps).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@model_gateway/src/core/worker_registry.rs`:
- Around line 453-462: The cleanup of model_retry_configs/model_retry_enabled
races with concurrent registrations because you check model_index emptiness then
remove retry state without synchronizing; wrap the model-index mutation and
retry-state updates for a given model in a model-scoped critical section (e.g.,
a per-model Mutex or RwLock) so that the emptiness check and subsequent removal
of entries are atomic with respect to concurrent register/remove operations;
apply this locking around the code that mutates self.model_index and the block
that touches self.model_retry_configs and self.model_retry_enabled (the section
using self.model_index.get(&model_id) and
self.model_retry_configs.remove(&model_id)/self.model_retry_enabled.remove(&model_id)).

---

Duplicate comments:
In `@model_gateway/src/core/worker_registry.rs`:
- Around line 296-303: set_model_retry_config currently updates
model_retry_configs and model_retry_enabled in two separate operations which can
interleave; change to a single atomic update by storing a combined value instead
of two maps or by performing both writes under the same lock. Concretely,
introduce a small struct (e.g., ModelRetry { config: RetryConfig, enabled: bool
}) and replace model_retry_configs/model_retry_enabled with a single map keyed
by model_id, then update set_model_retry_config to insert that combined struct
in one operation (or wrap the two inserts in the same mutex/critical section if
retaining two maps).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ae5be2df-1548-42c4-9e95-86bf0d388dbd

📥 Commits

Reviewing files that changed from the base of the PR and between d51eb24 and 1ce6e2f.

📒 Files selected for processing (1)
  • model_gateway/src/core/worker_registry.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

https://github.com/lightseekorg/smg/blob/1ce6e2fa33b58fe616ac9780464de592484474fd/model_gateway/src/core/worker_registry.rs#L375-L376
P2 Badge Clear retry overrides when same-URL registration drops a model

register() removes the old worker from each previous model when the same URL is re-registered, but the new retry-state cleanup only exists in remove(), so this path never clears model_retry_*. Fresh evidence: test_re_register_same_url_refreshes_all_model_indexes() now documents same-URL model swaps as a supported path. If a gpt-4o worker with retry overrides is replaced by the same URL serving o3/o4-mini, the stale gpt-4o override survives; a later gpt-4o worker with no overrides will then inherit that stale policy because RegisterWorkersStep intentionally skips default-config workers.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread model_gateway/src/core/worker_registry.rs
Store retry config per model in WorkerRegistry (last write wins).
When a worker registers with non-empty retry overrides, its resolved
RetryConfig is stored for the model group. Routers will use this
instead of a single global retry config.

- Add model_retry_configs and model_retry_enabled DashMaps
- Add get/set methods for per-model retry config
- Store retry config during worker registration (RegisterWorkersStep)
- Clean up retry config when last worker for a model is removed
- 2 new tests: last-write-wins semantics and cleanup on removal

Signed-off-by: Chang Su <chang.s.su@oracle.com>
- Fall back to worker.model_id() when worker.models() is empty,
  matching WorkerRegistry::worker_model_ids() behavior. Fixes retry
  config not being stored for wildcard/external workers.
- Clone retry config once outside the inner model loop.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
Make worker_model_ids() public and use it in RegisterWorkersStep
instead of duplicating the model ID resolution logic.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
… race

Move per-model retry config cleanup from remove_worker_from_model_index
(called during both removal and re-registration) to remove() (called
only during actual worker removal). This prevents re-registering the
same URL from clearing retry config when the worker is temporarily the
last one for a model.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
@CatherineSue
CatherineSue force-pushed the feat/per-group-retry-config branch from 1ce6e2f to a3d6517 Compare March 24, 2026 03:30
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@model_gateway/src/core/worker_registry.rs`:
- Around line 603-612: The condition does two separate lookups on
self.model_index for model_id; replace them with a single lookup to avoid
duplicated access and possible inconsistency by using a match/if-let on
self.model_index.get(&model_id) (e.g., match self.model_index.get(&model_id) {
None | Some(v) if v.is_empty() => { self.model_retry_configs.remove(&model_id);
self.model_retry_enabled.remove(&model_id); }, _ => {} }) so the cleanup of
model_retry_configs and model_retry_enabled happens only when the single-lookup
result indicates no entry or an empty entry for model_id.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9c9e230a-cbbf-4ce5-87dd-5dbe82cf6417

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce6e2f and a3d6517.

📒 Files selected for processing (2)
  • model_gateway/src/core/steps/worker/shared/register.rs
  • model_gateway/src/core/worker_registry.rs

Comment thread model_gateway/src/core/worker_registry.rs
…del_retry_enabled

Instead of a separate enabled flag, set max_retries=1 when retries
are disabled (matching RouterConfig::effective_retry_config() pattern).
This removes model_retry_enabled DashMap entirely and simplifies the
retry config storage to a single DashMap.

Also simplify double model_index lookup in remove() cleanup.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Restore comments that were lost during PR #836 refactor:
- "clone needed for DashMap key ownership" on type/connection index updates
- "no-op if mesh is not enabled" on mesh sync blocks

Signed-off-by: Chang Su <chang.s.su@oracle.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@CatherineSue
CatherineSue merged commit 42e4936 into main Mar 24, 2026
12 checks passed
@CatherineSue
CatherineSue deleted the feat/per-group-retry-config branch March 24, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model-gateway Model gateway crate changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants