Skip to content

Fix Membase Refit client deserializing graph values as inferred types - #10

Merged
iceljc merged 1 commit into
Lessen-AI:Developmentfrom
jlilessen:features/dietjacky/membase-refit-serializer-fix
Aug 3, 2026
Merged

Fix Membase Refit client deserializing graph values as inferred types#10
iceljc merged 1 commit into
Lessen-AI:Developmentfrom
jlilessen:features/dietjacky/membase-refit-serializer-fix

Conversation

@jlilessen

Copy link
Copy Markdown

Refit 8's default serializer adds ObjectToInferredTypesConverter, so Dictionary<string, object?> response values arrive as string/double/Dictionary instead of JsonElement, silently emptying every consumer that does TryGetValue (GraphBuilder, query_flow_graph, similarity search result parsing). Register the client with plain Web JsonSerializerOptions.

Also fail with a clear message in ProviderHelper when no LlmProviders entry exists for the requested model instead of a NullReferenceException.

Refit 8's default serializer adds ObjectToInferredTypesConverter, so
Dictionary<string, object?> response values arrive as string/double/Dictionary
instead of JsonElement, silently emptying every consumer that does
TryGetValue<JsonElement> (GraphBuilder, query_flow_graph, similarity search
result parsing). Register the client with plain Web JsonSerializerOptions.

Also fail with a clear message in ProviderHelper when no LlmProviders entry
exists for the requested model instead of a NullReferenceException.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@iceljc
iceljc merged commit 670d00a into Lessen-AI:Development Aug 3, 2026
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