Skip to content

refactoring - #176

Merged
zhongkaifu merged 2 commits into
mainfrom
refactor/plugin-architecture
Aug 29, 2026
Merged

refactoring#176
zhongkaifu merged 2 commits into
mainfrom
refactor/plugin-architecture

Conversation

@zhongkaifu

Copy link
Copy Markdown
Owner

No description provided.

@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: 4bd2761b2d

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +174 to +179
lock (Gate)
{
if (_builtInsLoaded)
return;
_builtInsLoaded = true;
}

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 Wait for built-in registration to finish

When two threads first access TryGet, Resolve, or All, the first thread sets _builtInsLoaded and releases Gate before registering the descriptors, so the second thread returns from EnsureBuiltIns and observes an empty or partially populated registry. A concurrent load of a supported model can therefore throw NotSupportedException; keep initialization under the reentrant monitor or use an initialization state that makes other threads wait for completion.

Useful? React with 👍 / 👎.

Comment on lines +160 to +162
// Ordered so the pick is stable when several companions sit side by side.
string[] matches = System.IO.Directory.GetFiles(directory, hint);
if (matches.Length > 0)

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 Match projector wildcard hints case-insensitively

On case-sensitive filesystems, Directory.GetFiles(directory, hint) applies the casing from the descriptor literally. For example, both Nemotron hints contain uppercase Nemotron, so a valid companion such as nemotron-mmproj.gguf is no longer auto-loaded, whereas the replaced CLI code filtered Nemotron names with OrdinalIgnoreCase; enumerate candidates and match hints case-insensitively to preserve that behavior.

Useful? React with 👍 / 👎.

Comment on lines 686 to +695
// Audio path: the chat template emits a `<so_embedding>` per uploaded
// audio file so the model "sees" the modality, but real inference is
// gated on a Parakeet audio mmproj that this distribution does not ship.
// The test data still gets preprocessed in the CLI for verification.
// The clip is still decoded and turned into its log-mel spectrogram so
// the frontend is exercised and the operator is told, once, why no audio
// inference will happen. (This used to live in the CLI, which meant the
// server silently ignored audio entirely; it belongs with the rest of
// the architecture's media handling.)
if (message.AudioPaths != null && message.AudioPaths.Count > 0)
PreprocessNemotronAudioForVerification(message.AudioPaths[0]);

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 Process Nemotron audio without requiring vision

For an audio-only Nemotron request without a loaded vision projector, the method returns at line 647 before reaching this newly centralized audio handling. The CLI now treats Nemotron as IAudioCapableModel, so it also skips the generic unsupported-audio warning, leaving the <so_embedding> prompt and audio silently unused instead of decoding it and emitting the explicit warning that the previous CLI path provided; move audio handling before the vision-only early return.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

Engine comparison — TensorSharp vs llama.cpp (PR smoke)

No report artifact was produced — the benchmark failed before generating results (see the workflow logs).

@zhongkaifu
zhongkaifu merged commit 631819d into main Aug 29, 2026
1 of 2 checks passed
@zhongkaifu
zhongkaifu deleted the refactor/plugin-architecture branch August 29, 2026 15:54
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.

1 participant