Add a durable named image proxy - #1730
Open
Aaronontheweb wants to merge 8 commits into
Open
Conversation
| : ValueOverride<ModelModality>.Set(ModelModality.Text); | ||
|
|
||
| if (!inputOverride.Value!.Value.HasFlag(ModelModality.Image) | ||
| || !inputOverride.Value.Value.HasFlag(ModelModality.Text) |
| .WithChild(_roleList) | ||
| .WithChild(new TextNode("").Height(1)) | ||
| .WithChild(new TextNode(" [Enter] Assign model [D] Discover models [C] Clear optional role") | ||
| .WithChild(new TextNode(" [Enter] Assign model [D] Discover models [C] Clear optional role or proxy") |
Comment on lines
+2831
to
+2834
| catch (Exception ex) | ||
| { | ||
| return new ImageProxyPreparationFailed(ex); | ||
| } |
Comment on lines
+48
to
+50
| var mediaDirectory = Path.GetFullPath(Path.Combine( | ||
| GetSessionDirectory(sessionId, basePath), | ||
| MediaSubdirectory)); |
| var mediaDirectory = Path.GetFullPath(Path.Combine( | ||
| GetSessionDirectory(sessionId, basePath), | ||
| MediaSubdirectory)); | ||
| var fullPath = Path.GetFullPath(Path.Combine(mediaDirectory, relativePath)); |
| configuration, | ||
| new StubRegistry(runtime), | ||
| new FakeTimeProvider(DateTimeOffset.FromUnixTimeMilliseconds(1234))); | ||
| var basePath = Path.Combine(Path.GetTempPath(), $"netclaw-image-proxy-{Guid.NewGuid():N}"); |
| client, | ||
| ModelCapabilityResolution.ResolveModelCapabilities(model, detected: null)); | ||
| var analyzer = CreateAnalyzer(model, runtime); | ||
| var basePath = Path.Combine(Path.GetTempPath(), $"netclaw-image-proxy-empty-{Guid.NewGuid():N}"); |
Aaronontheweb
force-pushed
the
feat/1728-named-image-proxy
branch
from
August 4, 2026 03:50
162a101 to
2add740
Compare
When a session contains historical media the current model cannot accept (e.g. images from a multimodal model in a text-only session), degrade gracefully: - ChatMessageConverter strips incompatible DataContent at assembly time without touching persisted MediaReferences. - SessionMessageAssembler injects a volatile [system: media-filtered] notice so the user knows content was omitted. - FireLlmCall logs a warning instead of failing the turn. - TryRejectIncompatibleInput only hard-rejects new user-supplied media (defense-in-depth; the adapter already handles this). The session stays usable. The assembler boundary is the single correct place to filter — after history reconstruction, before the provider. Tests: 11/11 pass (compatibility unit tests + modality gate tests + integration tests for recovered history and buffered drain paths).
Without the gate, the first FakeChatClient response completes instantly and the second turn's drain + model call races against the FishForMessageAsync timeout. Gating the first response ensures both TurnCompleted events arrive deterministically.
This guard was removed in the original PR but should have been kept. It catches media that slipped past the adapter's capability gate (a contract violation in netclaw-input-adapters), strips the offending references, logs an operator-visible error, and appends a system notice so the user knows something went wrong. This is the new-message counterpart to the assembly-time history filter added in the previous commit — both degrade instead of rejecting.
This reverts commit 8921afa.
Aaronontheweb
force-pushed
the
feat/1728-named-image-proxy
branch
from
August 4, 2026 04:49
2add740 to
17f86c1
Compare
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Models.Proxies.Imagewith schema, CLI, and TUI support.Safety
Validation
dotnet test Netclaw.slnx --no-restoredotnet slopwatch analyzepwsh ./scripts/Add-FileHeaders.ps1 -Verifyopenspec validate named-image-modality-proxy --strict./scripts/smoke/run-smoke.sh model-managerEval note
skill_image_proxy_configurationto the behavioral eval suite.Depends on #1729.
Closes #1728.