Skip to content

fix(provider): require optional provider model id (#620)#621

Draft
Daedalus-Icarus wants to merge 1 commit into
GeniePod:mainfrom
Daedalus-Icarus:fix/620-optional-provider-model
Draft

fix(provider): require optional provider model id (#620)#621
Daedalus-Icarus wants to merge 1 commit into
GeniePod:mainfrom
Daedalus-Icarus:fix/620-optional-provider-model

Conversation

@Daedalus-Icarus

Copy link
Copy Markdown

Summary

Fixes #620.

Parameterize the optional OpenAI-compatible provider path with an explicit model id instead of letting it fall back to the generic "default" placeholder.

Changes

  • add [optional_ai_provider].model to config and require it when the optional provider path is enabled
  • thread the configured model through LlmClient::from_config() into the OpenAI-compatible backend
  • serialize that configured model in outbound generic OpenAI-compatible chat requests
  • update provider/config/runtime-boundary test fixtures and docs/config templates

Real Behavior Proof

  • I have built and run the affected code locally (or noted why I could not).
  • I have verified the change end-to-end on Jetson hardware.
  • I have NOT verified on Jetson hardware, and I explain the equivalent verification path or validation gap below.

Tested profile / hardware (check all that apply):

  • jetson
  • raspberry_pi
  • portable_sbc
  • laptop
  • mac
  • CI-only / docs-only
  • Not run locally

What I ran

cargo fmt --all -- --check
cargo test -p genie-common validate_llm_provider_rejects_enabled_optional_provider_without_model
cargo test -p genie-common optional_ai_provider_can_use_oauth_bearer_env
cargo test -p genie-core --test provider_config_test from_config_selects_optional_openai_compatible_provider
cargo test -p genie-core generic_request_profile_uses_supplied_model_and_keeps_full_body
cargo test -p genie-core local_openai_compatible_provider_can_be_ready

What I observed

  • optional-provider config now fails loudly when [optional_ai_provider].model is empty
  • the generic OpenAI-compatible request-profile test now verifies that the supplied model id is emitted instead of "default"
  • the optional provider selection and readiness tests still pass with an explicit configured model id
  • I did not verify this on Jetson because the change is provider-config/client plumbing and documentation rather than a hardware-facing runtime path

Test plan

  • Configure [optional_ai_provider] with a local mock OpenAI-compatible endpoint and a real model value.
  • Confirm startup rejects an empty model.
  • Capture one outbound /v1/chat/completions request and verify the configured model id is present in the JSON body.

Notes for reviewers

This is a narrow follow-up to the merged provider-selection work from #595: provider selection was config-driven, but provider model selection was still hardcoded in the generic request profile.

@github-actions github-actions Bot added the bug Something isn't working label Jul 3, 2026
@matedev01

Copy link
Copy Markdown
Contributor

Reviewed — correct fix for #620 (model="default" hardcoding), clean plumbing. Please finalize: unmark draft, tick the proof section, and rebase (BEHIND). Ready to merge once green.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provider(optional_ai_provider): expose model selection instead of hardcoding model="default"

2 participants