Skip to content

keep merged model aliases in a stable order - #246

Merged
thushan merged 6 commits into
mainfrom
fix/unifier-stable-merge
Oct 27, 2026
Merged

thushan merged 6 commits into
mainfrom
fix/unifier-stable-merge

Conversation

@thushan

@thushan thushan commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

When one model (matched by digest) was registered from several backends, the merged alias list was rebuilt in random order. /olla/models and the provider listings emit the first alias as the model id, so the id could change between refreshes.

DefaultUnifier now merges in a stable order that leads with the model's own id. Related unifier fixes in the same area:

  • Clear() on the catalogue store and endpoint manager (catalog_store.go, endpoint_manager.go) resets in place instead of swapping the store, which raced with readers.
  • The metadata regexes in metadata_extractor.go are compiled once instead of per model.
  • createUnifier falls back to the default unifier when the factory errors, keeping the operator's config and lifecycle type, and logs once.

Type of change

  • Bug fix
  • Documentation

How was this tested?

New tests:

  • TestMergeUnifiedModels_OrderIsStableAndLeadsWithOwnID
  • TestMergeUnifiedModels_ShuffledInputKeepsOwnIDFirst
  • TestUnifiedRegistry_MergedListingIsStableAcrossRefreshOrder
  • TestUnifiers_ClearDuringUse
  • TestCreateUnifier_UsesCallerFallbackAndLogsOnce
  • TestCreateUnifier_HealthyFactoryDoesNotFallBack

Tested together with the other October follow-up branches on a local integration branch at 0c25e0a:

  • make ready and make test-race pass at 0c25e0a
  • /olla-validate --quick: 42 pass, 0 fail (warnings and skips are nightly-only items)
  • tei-routing validation area: Section A 12/12, Section B B1 to B6 pass
  • /test-sticky-sessions: no new failures (the 7 provider-route 404s are the known shared-mock-URL limitation)
  • /claude-code-e2e against real Ollama: Tier A 16/0 on both the passthrough and translation legs, same as main
  • curl checks per feature against real Ollama and ollamock; log scan shows no panics, races or per-request WARN floods

Checklist

  • make ready passes at 68cf74e
  • Tests added or updated for the change
  • Documentation updated: v0.0.30 release note
  • No new dependencies added

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9cb5e9f and 672d4ba.

Files selected for processing: 12
  • docs/content/about/release-notes.md
  • internal/adapter/registry/create_unifier_test.go
  • internal/adapter/registry/lifecycle_registry.go
  • internal/adapter/registry/unified_memory_registry.go
  • internal/adapter/registry/unified_memory_registry_race_test.go
  • internal/adapter/unifier/catalog_store.go
  • internal/adapter/unifier/concurrent_readers_test.go
  • internal/adapter/unifier/default_unifier.go
  • internal/adapter/unifier/default_unifier_test.go
  • internal/adapter/unifier/endpoint_manager.go
  • internal/adapter/unifier/lifecycle_unifier.go
  • internal/adapter/unifier/metadata_extractor.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@thushan
thushan merged commit fc32c8d into main Oct 27, 2026
8 checks passed
@thushan
thushan deleted the fix/unifier-stable-merge branch October 27, 2026 21:14
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