feat(wrapper): LLM proxy wrapper mode (feature 019)#40
Merged
levleontiev merged 3 commits intomainfrom Mar 16, 2026
Merged
Conversation
Adds fairvisor.wrapper module with 13 provider registry, composite Bearer parsing, provider-native error bodies and streaming cutoffs, header descriptor collection, and full nginx access/body_filter wiring. 28 BDD unit scenarios pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ectives, envsubst - Remove unused string_format + table_concat locals in wrapper.lua (luacheck warnings) - Move proxy_ssl_server_name/protocols and proxy_*_timeout out of nginx if-block (these directives are not allowed inside if blocks) - Add FAIRVISOR_UPSTREAM_TIMEOUT_MS to entrypoint.sh and validate_nginx_template.sh envsubst variable lists and defaults - Allow FAIRVISOR_MODE=wrapper in entrypoint.sh validation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 16, 2026
… gate Adds 6 BDD scenarios covering access_handler's main branches (401 parse failure, 404 unknown provider, allow path with upstream URL set, 429 rule_engine reject) plus wrapper.init valid/invalid paths. Recovers coverage regression from 85.83% back above 87.14% baseline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fairvisor.wrappermodule: 13 provider registry (OpenAI, Anthropic, Gemini native + compat, Grok, Groq, Mistral, DeepSeek, Perplexity, Together AI, Fireworks AI, Cerebras, Ollama)Authorization: Bearer <JWT>:<UPSTREAM_KEY>, splits at first colon, extracts JWT claimsreplace_openai_cutoff()post-processor (no changes to feature 014)header:*descriptor collection + stripping before upstream forwardingwrapper_access.lua,wrapper_body_filter.lua, updatedaccess.lua,body_filter.lua,init_worker.lua$wrapper_upstream_url,FAIRVISOR_UPSTREAM_TIMEOUT_MS, wrapper proxy_pass blockCloses #39
Agreed scope cuts (follow-up issues)
FAIRVISOR_MODE=hybrid) → tracked in feat(wrapper): hybrid mode — route known provider prefixes through wrapper alongside decision_api #41Authorization/x-api-key/x-goog-api-keyfrom upstream responses) → tracked in feat(wrapper): strip upstream auth headers from responses in wrapper mode #42Both were confirmed by шеф as intentional scope cuts from this PR.
Test plan
spec/unit/wrapper_spec.lua+features/wrapper.feature— all pass🤖 Generated with Claude Code