Skip to content

feat(models): add configurable inference slowdown - #674

Merged
SantiagoDePolonia merged 4 commits into
mainfrom
feat/slowing-down
Aug 11, 2026
Merged

feat(models): add configurable inference slowdown#674
SantiagoDePolonia merged 4 commits into
mainfrom
feat/slowing-down

Conversation

@SantiagoDePolonia

@SantiagoDePolonia SantiagoDePolonia commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a model-specific slowdown setting configurable from YAML, the environment, admin API, and dashboard.

  • Accepts an extra-time factor from 0.1 through 10; zero or an empty UI value disables it.
  • A factor of 0.5 adds 50% of measured inference time, producing about 1.5x total latency.
  • Supports concrete models and virtual models/aliases, including load-balanced aliases.
  • Alias settings take precedence; aliases without a setting inherit the selected concrete model setting.
  • Applies request user-path scoping through the existing virtual-model policy resolution.
  • Delays non-streaming chat, Responses, embeddings, and audio inference after successful provider execution.
  • Drains Chat Completions and Responses SSE streams asynchronously and releases read chunks on the scaled timeline.
  • Persists the setting in SQL and MongoDB and exposes it through the dashboard and OpenAPI schema.

Streaming slowdown intentionally buffers delayed upstream chunks in an unbounded in-memory queue, so large factors on long or high-volume streams can increase memory use. Realtime WebSocket sessions are not slowed.

Validation

  • go test ./...
  • affected-package race tests
  • make lint
  • dashboard JavaScript tests
  • dashboard production build and dist synchronization
  • git diff --check

AI Generated

Implementation and PR summary were prepared with Codex and reviewed through the repository test, lint, race, performance, documentation, and generated-asset checks.

Summary by CodeRabbit

  • New Features

    • Added configurable artificial inference delays for virtual models, from 0.1× to 10×; zero disables the delay.
    • Delays apply to chat, responses, embeddings, audio, and streaming requests while honoring cancellation.
    • Added dashboard controls and visibility for supported aliases, redirects, and model policies.
    • Added inheritance and explicit override support for slowdown settings.
  • Documentation

    • Documented configuration, validation limits, precedence, streaming behavior, memory effects, and WebSocket exclusions.
  • Bug Fixes

    • Improved policy cleanup so configured slowdown settings are preserved.

@mintlify

mintlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
gomodel 🟢 Ready View Preview Aug 11, 2026, 11:04 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c2b4e072-a1ca-47aa-98f2-3f0c8a5ee885

📥 Commits

Reviewing files that changed from the base of the PR and between 4d2dbd1 and 08c345b.

📒 Files selected for processing (2)
  • internal/streaming/slowdown_stream.go
  • internal/streaming/slowdown_stream_test.go

📝 Walkthrough

Walkthrough

Adds configurable virtual-model slowdown factors. The change validates and persists values, resolves them by alias and policy, delays inference and streaming responses, exposes admin API and dashboard controls, and documents the behavior.

Changes

Virtual-model slowdown support

Layer / File(s) Summary
Model contract and persistence
config/..., internal/virtualmodels/..., internal/admin/..., docs/openapi.json
Adds slowdown to configuration, domain models, API schemas, admin upserts, SQL and MongoDB storage, and generated views.
Validation and model resolution
internal/virtualmodels/validation.go, internal/virtualmodels/slowdown.go, internal/gateway/..., internal/server/model_slowdown.go
Accepts finite factors from 0.1 through 10, allows zero to disable slowdown, and resolves values using aliases, policies, requested models, resolved models, and user paths.
Inference and stream delays
internal/gateway/..., internal/server/audio_service.go, internal/streaming/...
Delays successful chat, Responses, embeddings, speech, transcription, translation, and streaming results. Cancellation and provider errors remain propagated.
Admin UI and documentation
web/dashboard/..., docs/features/virtual-models.mdx, .env.template, config/config.example.yaml
Adds slowdown editing, payload preservation, model-row display, supported-form checks, tests, examples, and behavior documentation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant RequestModelResolution
  participant VirtualModelsService
  participant GatewayInference
  participant Provider
  Client->>RequestModelResolution: submit model request
  RequestModelResolution->>VirtualModelsService: resolve slowdown
  VirtualModelsService-->>RequestModelResolution: return factor
  RequestModelResolution->>GatewayInference: execute with factor
  GatewayInference->>Provider: call inference provider
  Provider-->>GatewayInference: return result or stream
  GatewayInference-->>Client: return after configured delay
Loading

Possibly related PRs

  • ENTERPILOT/GoModel#245: Extends inference orchestration paths that this change modifies for slowdown handling.
  • ENTERPILOT/GoModel#423: Introduces virtual-model paths extended here with slowdown configuration and resolution.
  • ENTERPILOT/GoModel#543: Modifies the Anthropic streaming path that this change wraps with slowdown delivery handling.

Poem

A rabbit stores a factor small,
Then slows each stream and call.
Aliases guide the setting’s way,
Canceled waits stop without delay.
Models and dashboards now agree.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: configurable inference slowdown for models.
Description check ✅ Passed The description uses the required sections and clearly explains the change, behavior, scope, risks, and validation performed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/slowing-down

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/server/audio_service.go (1)

91-105: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add table-driven tests for audio slowdown behavior.

Add coverage for speech, transcription, and translation. Verify the resolved route factor, delay after a successful provider call, and cancellation before the response is sent.

As per coding guidelines, “Add or update table-driven tests for behavior changes.”

Also applies to: 176-193, 233-240

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/server/audio_service.go` around lines 91 - 105, Add table-driven
tests covering speech, transcription, and translation handlers, using the
corresponding route slowdown configuration. Verify each test resolves the
expected slowdown factor, applies the delay after a successful provider call,
and handles context cancellation before sending the response; cover the success
paths around CreateSpeech and the analogous transcription/translation provider
calls.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/openapi.json`:
- Around line 11055-11058: Constrain the slowdown schema to accept only 0 or
numeric factors from 0.1 through 10. Apply this same OpenAPI constraint at
docs/openapi.json lines 11055-11058, 14398-14401, and 14454-14457, covering the
request, view response, and persisted virtual-model response definitions.

In `@internal/gateway/request_model_resolution_test.go`:
- Around line 115-140: Refactor
TestResolveRequestModelCarriesResolvedSlowdownFactor into table-driven cases
covering an alias factor, a direct model factor, and a resolver that does not
implement ModelSlowdownResolver. For each case, assert the expected resolved
slowdown and request-resolution result, while preserving the existing alias
resolver input assertions where applicable.

In `@internal/gateway/slowdown_test.go`:
- Around line 11-29: Refactor the waitForInferenceSlowdown tests into a
table-driven test covering nil workflow, zero slowdown factor, positive slowdown
factor, and canceled context cases. Store each case’s expected delay and error
in the table, then run them through the existing waitForInferenceSlowdown symbol
while preserving the current timing tolerance and error assertions.

In `@internal/streaming/slowdown_stream.go`:
- Line 87: Update the queueing logic in the slowdown stream implementation
around s.queue to enforce a bounded byte or chunk capacity before appending
upstream chunks. Apply backpressure or a clearly defined overflow failure
policy, and ensure blocked producers are released when the stream context is
cancelled.
- Line 33: Update the stream lifecycle around the goroutine started by go
s.drain() so parent-context cancellation closes the upstream source, ensuring
drain exits even when the provider reader ignores its request context. Wire
s.ctx.Done() to the stream/source close path while preserving normal reads, and
add a regression test verifying source.Close() is called and drain terminates
after cancellation.

In `@internal/virtualmodels/slowdown_test.go`:
- Around line 10-130: Convert the resolution and validation coverage in
internal/virtualmodels/slowdown_test.go (lines 10-130) into table-driven
subtests, covering valid boundaries, disabled zero, math.NaN(), positive and
negative infinity, alias precedence, and user-path scope; retain the existing
assertions for each case. Add table-driven configuration conversion cases in
internal/virtualmodels/config_overlay_test.go (lines 12-40), using the existing
test symbols and helpers; both sites require direct changes.

In `@internal/virtualmodels/slowdown.go`:
- Around line 25-33: Preserve explicit alias slowdown values by distinguishing
an omitted setting from configured zero across configuration, API, persistence,
and VirtualModel representations. Update the redirect lookup in the slowdown
resolution flow so it returns the alias slowdown whenever configured, including
zero, before evaluating matchingPolicy for the resolved concrete model.

In `@web/dashboard/src/pages/models/VirtualModelEditor.svelte`:
- Around line 182-192: Update VirtualModelEditor.svelte (182-192) to accept
slowdown 0 and state that zero or empty disables it; update .env.template
(205-206), config/config.example.yaml (64), and docs/features/virtual-models.mdx
(40-44, 166-167) with the same contract, including active values 0.1–10. Replace
duplicated cases in internal/admin/handler_virtualmodels_test.go (402-438) with
a table-driven endpoint test covering 0, both active boundaries, and rejected
values. Update web/dashboard/tests/models-virtual-models.test.js (483-504) to
verify numeric zero omits slowdown from the save payload.

---

Outside diff comments:
In `@internal/server/audio_service.go`:
- Around line 91-105: Add table-driven tests covering speech, transcription, and
translation handlers, using the corresponding route slowdown configuration.
Verify each test resolves the expected slowdown factor, applies the delay after
a successful provider call, and handles context cancellation before sending the
response; cover the success paths around CreateSpeech and the analogous
transcription/translation provider calls.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ab97eeba-1940-4c6d-9d58-eee1f9c0b1ca

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0f27c and b9cf5b8.

⛔ Files ignored due to path filters (3)
  • internal/admin/dashboard/static/dist/assets/index-BoW-V4GJ.js is excluded by !**/dist/**
  • internal/admin/dashboard/static/dist/assets/index-D05Km9Si.js is excluded by !**/dist/**
  • internal/admin/dashboard/static/dist/index.html is excluded by !**/dist/**
📒 Files selected for processing (33)
  • .env.template
  • config/config.example.yaml
  • config/virtualmodels.go
  • docs/features/virtual-models.mdx
  • docs/openapi.json
  • internal/admin/handler_virtualmodels.go
  • internal/admin/handler_virtualmodels_test.go
  • internal/core/request_model_resolution.go
  • internal/gateway/inference_execute.go
  • internal/gateway/interfaces.go
  • internal/gateway/request_model_resolution.go
  • internal/gateway/request_model_resolution_test.go
  • internal/gateway/slowdown.go
  • internal/gateway/slowdown_test.go
  • internal/server/audio_service.go
  • internal/server/model_slowdown.go
  • internal/streaming/slowdown_stream.go
  • internal/streaming/slowdown_stream_test.go
  • internal/virtualmodels/config.go
  • internal/virtualmodels/config_overlay_test.go
  • internal/virtualmodels/service.go
  • internal/virtualmodels/slowdown.go
  • internal/virtualmodels/slowdown_test.go
  • internal/virtualmodels/store_mongodb.go
  • internal/virtualmodels/store_sql.go
  • internal/virtualmodels/store_test.go
  • internal/virtualmodels/types.go
  • internal/virtualmodels/validation.go
  • web/dashboard/src/pages/models/ModelRow.svelte
  • web/dashboard/src/pages/models/VirtualModelEditor.svelte
  • web/dashboard/src/pages/models/virtualModels.svelte.js
  • web/dashboard/src/pages/models/virtualModelsLogic.js
  • web/dashboard/tests/models-virtual-models.test.js

Comment thread docs/openapi.json
Comment thread internal/gateway/request_model_resolution_test.go
Comment thread internal/gateway/slowdown_test.go Outdated
Comment thread internal/streaming/slowdown_stream.go
Comment thread internal/streaming/slowdown_stream.go
Comment thread internal/virtualmodels/slowdown_test.go Outdated
Comment thread internal/virtualmodels/slowdown.go Outdated
Comment thread web/dashboard/src/pages/models/VirtualModelEditor.svelte Outdated
@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Confidence Score: 3/5

Not ready to merge until cancellation reliably interrupts the upstream stream reader or ownership guarantees an immediate close on every abandoned-stream path.

The affected cancellation path was exercised with a blocking upstream reader and showed that context cancellation alone leaves the source open and the drainer blocked. Focused checks also confirmed policy precedence and dashboard range handling behave as intended.

Files Needing Attention: internal/streaming/slowdown_stream.go needs cancellation-aware upstream cleanup; its lifecycle behavior should be covered with a blocked-reader regression test.

Security Review

A cancellation-triggerable resource-retention issue was reproduced in the slowdown stream wrapper. When cancellation occurs while the upstream reader is blocked, the wrapper returns context.Canceled to its consumer but does not itself close the upstream reader. Repeated abandoned wrapper use can retain upstream connections and blocked goroutines, creating an availability risk.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced proof for a posted P1 finding and demonstrated how cancellation affects the upstream Read; a cancellation-only run blocks the upstream Read and an explicit Close run unblocks it.
  • A focused Go harness tested slowdown behavior with exact-zero slowdown and broader policy; the exact-zero case disabled slowdown and test expectations passed.
  • A Playwright Chromium harness opened the dashboard editor and validated slowdown entry constraints by submitting 10.1 and observing range validation and server rejection behavior.
  • T-Rex identified a slowdown drainage/cancellation issue where a cancelled request can leave an open upstream connection and a blocked drain; a remediation approach recommends ensuring Close() is invoked on cancellation or adding a cancellation watcher to unblock upstream reads.
  • Browser and API validation confirmed end-to-end enforcement of slowdown limits: UI rejects out-of-range values and backend enforces them with appropriate HTTP responses.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Context cancellation leaves the slowdown drainer blocked in the upstream read

    • Bug
      • After the drainer enters a blocked upstream Read, cancelling the context makes the returned stream's downstream Read return context.Canceled, but the upstream receives no Close and remains blocked. The targeted harness observed this for 75 ms after cancellation with zero upstream closes. Calling the wrapper's Close then calls upstream Close and unblocks the drainer.
    • Cause
      • slowdownStream.drain at internal/streaming/slowdown_stream.go:61 performs a blocking s.source.Read(buf) without any cancellation mechanism. The stream context is checked only by downstream Read and queue operations; source.Close() is called only by slowdownStream.Close at lines 173-186.
    • Fix
      • Ensure lifecycle code always closes the returned stream on request cancellation, and preferably make cancellation itself reliably unblock the source (for example, a goroutine waiting on s.ctx.Done() that idempotently closes source, coordinated with Close to preserve close errors and avoid double-close hazards). Add a regression test using a ReadCloser whose Read blocks until Close.

    T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "feat(models): add configurable inference..." | Re-trigger Greptile

Comment thread internal/streaming/slowdown_stream.go
@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

Addressed the slowdown review feedback in dad5a66.

Most importantly, usage and cost observers now consume provider events before client-facing slowdown buffering. When the provider finishes, the observed source is closed and usage is flushed even if the client disconnects before the queued final usage event is delivered. This is covered for both Chat Completions and Responses with a regression test that waits for upstream completion, cancels the client while delivery remains delayed, and verifies usage is recorded exactly once.

Also included:

  • cancellation closes a blocked upstream stream;
  • explicit zero overrides inherited slowdown, while omission inherits;
  • OpenAPI/UI constraints for 0 or 0.1–10;
  • table-driven resolver, wait, validation, config, storage, and audio endpoint tests.

The delayed stream remains intentionally unbounded because full upstream draining and in-memory accumulation are part of the requested mode; the memory tradeoff is documented.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
internal/virtualmodels/validation.go (1)

137-145: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add direct tests for non-finite slowdown values.

The endpoint test cannot send NaN or infinities through JSON. Add a table-driven unit test for validateSlowdown with nil, zero, both limits, out-of-range values, math.NaN(), and positive and negative infinity. The coverage summary reports partial virtual-model validation coverage.

As per coding guidelines, “Add or update table-driven tests for behavior changes, including … error handling.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/virtualmodels/validation.go` around lines 137 - 145, Add a
table-driven unit test for validateSlowdown covering nil, zero,
MinSlowdownFactor, MaxSlowdownFactor, values below and above the allowed range,
math.NaN(), positive infinity, and negative infinity; assert valid inputs return
nil and invalid inputs return an error.

Source: Coding guidelines

internal/virtualmodels/store_test.go (1)

14-50: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add table-driven coverage for slowdown replacement.

The test only covers inserts. Add an upsert-and-get case that changes an existing Slowdown from a configured value to nil. This verifies that stores clear an alias override instead of retaining stale slowdown data. Include nil, zero, minimum, and maximum values in the table.

As per coding guidelines, “Add or update table-driven tests for behavior changes.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/virtualmodels/store_test.go` around lines 14 - 50, The existing
store test only verifies inserts and must cover replacing an existing slowdown
value. Add a table-driven upsert-and-get test around the VirtualModel store
flow, updating an existing model’s Slowdown from a configured value to nil and
verifying the stored result clears the stale override; include nil, zero,
minimum, and maximum slowdown cases.

Source: Coding guidelines

web/dashboard/tests/models-virtual-models.test.js (1)

533-539: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add negative cases for unsupported policy scopes.

vmFormSupportsSlowdown explicitly rejects the global selector "/" and provider selectors ending in "/", but these tests cover only supported forms. Add assertions for both exclusions to protect this scope contract.

Suggested assertions
+  assert.equal(vmFormSupportsSlowdown({ source: "/" }), false);
+  assert.equal(vmFormSupportsSlowdown({ source: "openai/" }), false);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/dashboard/tests/models-virtual-models.test.js` around lines 533 - 539,
Extend the test case for vmFormSupportsSlowdown with negative assertions
covering the unsupported global selector "/" and provider selector ending in "/"
policy scopes, confirming both return false while preserving the existing
supported-form assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/server/audio_service_test.go`:
- Around line 36-38: Add a separate provider-completion signal in the test
setup, close it only after waitForAudioResponse finishes, and await it before
triggering cancellation. Update the affected test paths around providerCalled
and waitForAudioResponse so cancellation occurs during the post-inference delay
rather than while provider execution is still active.

In `@internal/streaming/slowdown_stream_test.go`:
- Around line 58-76: Convert TestSlowdownStreamCancellationClosesBlockedUpstream
into a table-driven test covering parent-context cancellation and explicit
stream.Close() while the upstream Read is blocked. For each case, start the
stream, wait for source.readStarted, trigger the case-specific shutdown action,
and assert source.closed occurs within the existing timeout; retain cleanup and
isolate fresh context/source/stream instances per test case.

In `@internal/virtualmodels/types.go`:
- Around line 50-53: Update VirtualModel.clone to deep-copy the Slowdown pointer
when it is non-nil, while preserving nil values; ensure Service.Get returns the
cloned value without sharing Slowdown storage with the active snapshot,
consistent with the existing SessionAffinity copy.

---

Outside diff comments:
In `@internal/virtualmodels/store_test.go`:
- Around line 14-50: The existing store test only verifies inserts and must
cover replacing an existing slowdown value. Add a table-driven upsert-and-get
test around the VirtualModel store flow, updating an existing model’s Slowdown
from a configured value to nil and verifying the stored result clears the stale
override; include nil, zero, minimum, and maximum slowdown cases.

In `@internal/virtualmodels/validation.go`:
- Around line 137-145: Add a table-driven unit test for validateSlowdown
covering nil, zero, MinSlowdownFactor, MaxSlowdownFactor, values below and above
the allowed range, math.NaN(), positive infinity, and negative infinity; assert
valid inputs return nil and invalid inputs return an error.

In `@web/dashboard/tests/models-virtual-models.test.js`:
- Around line 533-539: Extend the test case for vmFormSupportsSlowdown with
negative assertions covering the unsupported global selector "/" and provider
selector ending in "/" policy scopes, confirming both return false while
preserving the existing supported-form assertions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b808d6fd-d0ee-4633-80a5-00afb608cdc0

📥 Commits

Reviewing files that changed from the base of the PR and between b9cf5b8 and dad5a66.

⛔ Files ignored due to path filters (2)
  • internal/admin/dashboard/static/dist/assets/index-DiApg2WK.js is excluded by !**/dist/**
  • internal/admin/dashboard/static/dist/index.html is excluded by !**/dist/**
📒 Files selected for processing (32)
  • .env.template
  • config/config.example.yaml
  • config/virtualmodels.go
  • docs/features/virtual-models.mdx
  • docs/openapi.json
  • internal/admin/handler_virtualmodels.go
  • internal/admin/handler_virtualmodels_test.go
  • internal/gateway/inference_execute.go
  • internal/gateway/inference_orchestrator.go
  • internal/gateway/request_model_resolution_test.go
  • internal/gateway/slowdown_test.go
  • internal/server/audio_service_test.go
  • internal/server/messages_handler.go
  • internal/server/stream_slowdown_test.go
  • internal/server/translated_inference_service.go
  • internal/streaming/slowdown_stream.go
  • internal/streaming/slowdown_stream_test.go
  • internal/virtualmodels/config_overlay_test.go
  • internal/virtualmodels/service.go
  • internal/virtualmodels/slowdown.go
  • internal/virtualmodels/slowdown_test.go
  • internal/virtualmodels/store_mongodb.go
  • internal/virtualmodels/store_sql.go
  • internal/virtualmodels/store_test.go
  • internal/virtualmodels/types.go
  • internal/virtualmodels/validation.go
  • tools/openapi-postprocess.mjs
  • web/dashboard/src/pages/models/ModelRow.svelte
  • web/dashboard/src/pages/models/VirtualModelEditor.svelte
  • web/dashboard/src/pages/models/virtualModels.svelte.js
  • web/dashboard/src/pages/models/virtualModelsLogic.js
  • web/dashboard/tests/models-virtual-models.test.js

Comment thread internal/server/audio_service_test.go
Comment thread internal/streaming/slowdown_stream_test.go
Comment thread internal/virtualmodels/types.go
@SantiagoDePolonia

Copy link
Copy Markdown
Contributor Author

Follow-up P2 findings are addressed:

  • slowdown pointers are deep-copied from snapshot clones in 4d2dbd1;
  • terminal EOF/provider errors are persisted after delivery in 08c345b, so subsequent Read calls return the same error immediately instead of waiting on an empty queue.

The terminal-state regression is table-driven for EOF and a custom upstream error and performs two terminal reads with a timeout to guard against the prior hang.

@SantiagoDePolonia
SantiagoDePolonia merged commit 3900dbb into main Aug 11, 2026
19 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.

2 participants