Skip to content

[codex] Filter engine config flags by command context#64

Open
xu16601526267 wants to merge 1 commit into
developfrom
codex/engine-config-flag-filter
Open

[codex] Filter engine config flags by command context#64
xu16601526267 wants to merge 1 commit into
developfrom
codex/engine-config-flag-filter

Conversation

@xu16601526267
Copy link
Copy Markdown
Contributor

Summary

This PR prevents resolver-only or LLM-only config knobs from being emitted as CLI flags for service wrappers that do not support them.

What changed

  • adds engine/model-type aware config flag filtering
  • passes model type through resolved config and runtime deploy requests
  • keeps legacy flag behavior when no engine/model context is available
  • preserves LLM flags for vLLM/SGLang/llama-style commands and qwen-asr vLLM wrappers
  • adds coverage for runtime flag emission and K3S pod generation

Why

AIMA can resolve generic model config keys such as max_model_len, gpu_memory_utilization, and mem_fraction_static, but image/audio/TTS/OCR service wrappers often do not expose those flags. Emitting them caused one-click deploy failures such as server.py: error: unrecognized arguments: --max-model-len 8192.

Validation

  • go test ./internal/knowledge -count=1
  • go test ./internal/runtime -run TestConfigToFlags -count=1
  • git diff --check

@xu16601526267
Copy link
Copy Markdown
Contributor Author

Linux target validation passed on aitopatom-5ba7 (qujing@222.128.15.222:22222, Linux 6.11.0-1016-nvidia, aarch64) with temporary user-local go1.25.0 linux/arm64.

Validation run:

  • git diff --check origin/develop...HEAD
  • go test ./cmd/aima ./internal/knowledge ./internal/runtime -count=1
  • go test ./... -count=1

Remote logs:

  • related package logs: /home/qujing/aima-pr-ready-validation/logs-20260515T172839Z
  • full package logs: /home/qujing/aima-pr-ready-validation/logs-full-20260515T172935Z

@xu16601526267 xu16601526267 marked this pull request as ready for review May 15, 2026 17:32
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