Problem/Motivation

resolveProviderType() decides cloud vs local from a hardcoded provider-id whitelist (ollama, lmstudio, localai, koboldcpp). A local model served over an OpenAI-compatible endpoint through ai_provider_openai has provider_id = openai, so it is recorded as cloud. Those local calls then consume the cloud token quota and show under cloud cost, which breaks the self-hosted FinOps case.

Proposed resolution

Let a self-hosted endpoint be recorded as local instead of cloud. Approach to be decided; should fit the local infra-cost work planned for 2.0.0.

Environment

Drupal 11.3, ai 1.4.3, ai_provider_openai pointed at local Ollama, ai_metering 1.0.0-beta1.

AI assistance

Found through live multi-provider testing (OpenAI provider pointed at local Ollama).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codeitwisely created an issue. See original summary.

  • 4aebca46 committed on 1.0.x
    Issue #3609168 by codeitwisely: Let local OpenAI-compatible endpoints be...
codeitwisely’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.