Skip to content

docs: runnable and tested Ollama budget example - #1

Merged
cport1 merged 1 commit into
mainfrom
feat/ollama-provider-example
Oct 4, 2026
Merged

cport1 merged 1 commit into
mainfrom
feat/ollama-provider-example

Conversation

@cport1

@cport1 cport1 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the remaining provider-example acceptance in WebDecoy/app#1464.

  • Runnable non-streaming local Ollama AsyncClient.generate integration around the existing per-attempt budget API.
  • Fixed local model, raw input, bounded input/context/output settings, explicit observe/fail-open configuration and no paid fallback.
  • Final response normalization, retained unknown usage, cancellation/error semantics and preserved output on settlement failure.
  • Pin Ollama 0.6.3 only for the example and development tests; no runtime dependency/API/version changes.
  • Explain application authentication/admission placement and deferred streaming/LangChain/LangGraph coverage.

Validation

  • All 64 SDK tests pass; lint and formatting pass; wheel and sdist build.
  • Seven new tests exercise the actual Ollama SDK HTTP serialization/parsing against in-memory responses: reserve-before-inference, denial-before-provider, privacy, missing/mismatched usage, explicit zero, cancellation/error and settlement outage without retry.
  • Fresh virtualenv with published webdecoy-ai-protection==0.1.0a1 and ollama==0.6.3 passes all seven example tests.
  • No model execution, paid calls, provider billing validation or production changes. Provider token settings remain provider-enforced, not a billing guarantee.

@cport1
cport1 merged commit 4544c8f into main Oct 4, 2026
8 checks passed
@cport1 cport1 mentioned this pull request Oct 8, 2026
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