Skip to content

fix(model): ignore oversized numbers in unused generation metadata - #173

Merged
shuk777 merged 1 commit into
Edge0-AI:mainfrom
Afloat16:fix/20261111-ignore-large-generation-metadata
Nov 16, 2026
Merged

shuk777 merged 1 commit into
Edge0-AI:mainfrom
Afloat16:fix/20261111-ignore-large-generation-metadata

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

What & why

read_generation_defaults ignores unsupported provider fields, but its parser first converts every number into signed int64 or double. A valid seed: 18446744073709551615, or a large counter inside an otherwise ignored object, therefore rejects the entire configuration and prevents model loading.

Let syntactically valid out-of-range numbers survive parsing as an ignored marker. The existing type checks still reject out-of-range values in supported defaults and required catalog fields. Invalid numeric grammar is still rejected.

Area

  • Engine, CLI or server (edge0-infer/)

How was it tested?

Built and ran tests/unit/model/generation_test.cpp with GCC 14 against the CPU GGML libraries. The new unsigned-seed regression fails against the base parser and the updated test passes with the fix. The test covers ignored nested/list values, strict rejection of overflowing top_k, invalid numeric suffixes and the existing defaults cases.

The normal CPU build exposes pre-existing GCC 14 warnings treated as errors; this focused binary was compiled without -Werror. No model files or network providers are used.

Checklist

  • Added positive and negative regression cases
  • Focused generation-defaults test passes

@shuk777 shuk777 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shuk777
shuk777 merged commit 2ed7c43 into Edge0-AI:main Nov 16, 2026
1 check 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