Skip to content

refactor(model)!: require a name on the llm interface - #30

Merged
ktsoator merged 1 commit into
mainfrom
refactor/require-model-name
Sep 25, 2026
Merged

ktsoator merged 1 commit into
mainfrom
refactor/require-model-name

Conversation

@uterflec

Copy link
Copy Markdown
Collaborator

Model IDs were exposed through an optional method and a runtime type assertion. Require Name() string on model.LLM so agents can retrieve the configured model ID directly.

Update the OpenAI adapter and test models, and simplify llmAgent.ModelName. Custom model implementations must add Name(); the OpenAI adapter's ModelName method is renamed to Name.

Validation: go vet and all tests passed with the race detector.

Add Name to model.LLM to expose the configured model ID directly.
Update the OpenAI adapter and test models, and simplify the agent's
ModelName method to call Name without a type assertion.

BREAKING CHANGE: model.LLM implementations must provide Name() string.
The OpenAI adapter's ModelName method is renamed to Name.
@uterflec uterflec added refactor Internal design and implementation improvements breaking-change Public API changes requiring updates in calling code area:model Model interfaces and provider adapters area:agent Agent interfaces, invocation context, and agent implementations labels Sep 24, 2026
@ktsoator
ktsoator self-requested a review September 24, 2026 09:41
@ktsoator
ktsoator merged commit b1394e2 into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent interfaces, invocation context, and agent implementations area:model Model interfaces and provider adapters breaking-change Public API changes requiring updates in calling code refactor Internal design and implementation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants