Skip to content

feat: support status for ModelConfig - #2623

Open
yuval-k wants to merge 5 commits into
mainfrom
yuval-k/model-config-status
Open

feat: support status for ModelConfig#2623
yuval-k wants to merge 5 commits into
mainfrom
yuval-k/model-config-status

Conversation

@yuval-k

@yuval-k yuval-k commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

2 conditions
Accepted - for translation error
ResolvedRefs - for reference issues (i.e. model config referencing a secret)

@yuval-k
yuval-k requested a review from a team as a code owner August 28, 2026 20:45
@github-actions github-actions Bot added the enhancement New feature or request label Aug 28, 2026
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
@yuval-k
yuval-k force-pushed the yuval-k/model-config-status branch from fb541b3 to 6b41882 Compare August 28, 2026 20:45
}

type ModelConfigTranslation struct {
Model adk.Model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All harnesses should consume a validated and resolved ModelConfig, but this shared type is kagent-specific because it embeds adk.Model, and collectionReader constructs it with kagenttranslator.NewModelCompiler. Could this instead be a harness-neutral resolved model containing validated config, resolved non-secret values, references, and provenance, leaving ADK, Codex, and Claude rendering to their adapters?

statuses, _ := krt.NewStatusCollection(modelConfigs, func(ctx krt.HandlerContext, modelConfig *kagentv1alpha3.ModelConfig) (*kagentv1alpha3.ModelConfigStatus, *ModelConfigReconciliation) {
state := &ModelConfigReconciliation{ModelConfigName: krt.Named{Namespace: modelConfig.Namespace, Name: modelConfig.Name}}
reader := collectionReader{ctx: ctx, configMaps: configMaps, secrets: secrets, modelConfigs: modelConfigs}
translation, translationErr := kagenttranslator.NewModelCompiler(reader).TranslateModel(context.Background(), modelConfig)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we make this shared resolution return typed semantic-vs-reference failures and validate the effective provider references? Right now TranslateModel dereferences SAP/Bedrock Secrets and Foundry ConfigMaps, so missing references also set Accepted=False, while addSecret misses the TLS caCertSecretKey, SAP client_id/client_secret, and Bedrock fixed credential keys. That can make the two conditions inconsistent or report ResolvedRefs=True for unusable credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants