You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add one secret-safe inference route contract for CodeNib chat generation and vector construction. The zero-secret product path remains deterministic static Wiki plus BM25. Local Hugging Face and BYO OpenAI-compatible endpoints provide optional semantic and generated-content capabilities through the same public configuration model.
GitHub Models was fully retired by GitHub on 2026-07-30. CodeNib must reject its former aliases rather than infer GITHUB_TOKEN or target the retired endpoint.
Current Gap
The existing product surfaces are individually functional, but their assumptions do not line up:
chat uses model strings plus optional LiteLLM endpoint/key fields;
vector construction defaults to local Hugging Face and the CLI cannot select a remote provider;
default compiler registration hard-codes the Hugging Face provider;
VectorIndexBuilder embedding kwargs are persisted as artifact identity, so they are unsafe for runtime credentials;
Wiki runtime configuration can substitute a remote embedding client without a complete persisted compatibility fingerprint;
doctor validates chat backends but not the embedding route needed to build or query a vector artifact.
Design
Route resolution
Introduce dependency-light, side-effect-free route resolvers for chat and embeddings. A resolved route has:
canonical provider id;
model id;
operation;
normalized endpoint identity;
credential source name and availability, never the credential value;
public provider/model options that affect behavior;
a stable compatibility fingerprint over public fields.
Local Hugging Face is the built-in embedding route. OpenAI-compatible endpoints are the portable remote embedding route. Chat retains native LiteLLM provider prefixes and an OpenAI-compatible escape hatch.
runtime client parameters: API key and other process-local authentication data.
Batching, retry, timeout, and credentials do not determine vector compatibility and stay out of the artifact. Any setting that can change produced vectors must be included in the compatibility identity.
Product surfaces
Add explicit provider/model/dimension/endpoint/key-env options to semantic indexing.
Make dependency checks provider-aware: local Hugging Face needs Sentence Transformers; remote providers need the OpenAI SDK and credentials when required.
Reopen vector artifacts only with a compatible route; report a clear mismatch instead of silently substituting a model or endpoint.
Let Wiki generation use provider-native LiteLLM routes or a BYO OpenAI-compatible service.
Extend codenib doctor with redacted static diagnostics and optional minimal chat/embedding probes.
Keep the default static Wiki and BM25 workflow model-free and credential-free.
Security
Never serialize credential values or request headers.
Never print token fragments in errors.
Do not infer a provider from the mere presence of a credential.
Do not use model-enabled credentials on untrusted fork code or pull_request_target.
Persist endpoint identity only after rejecting URL userinfo, query strings, and fragments.
Reject the retired github_models and github-models provider names with an actionable message.
Acceptance Criteria
Pure resolver tests cover Hugging Face and OpenAI-compatible chat/embedding routes.
Credential precedence and missing-credential diagnostics are deterministic and redacted.
No credential can enter manifest/vector artifact configuration under the supported CLI path.
Vector compatibility fingerprints change for provider, model, dimension, endpoint, revision, prompt, normalization, or truncation changes, but not for token, timeout, retry, or batch-size changes.
Semantic indexing can build against a mocked OpenAI-compatible embeddings endpoint without Sentence Transformers installed.
A persisted remote vector artifact can be reopened only by a compatible query route.
Wiki generation and doctor accept the same BYO route fields.
Unit, compiler, CLI, Wiki configuration, and secret-regression tests pass.
Documentation states that static Pages never receives a credential.
Parent: #415
Summary
Add one secret-safe inference route contract for CodeNib chat generation and vector construction. The zero-secret product path remains deterministic static Wiki plus BM25. Local Hugging Face and BYO OpenAI-compatible endpoints provide optional semantic and generated-content capabilities through the same public configuration model.
GitHub Models was fully retired by GitHub on 2026-07-30. CodeNib must reject its former aliases rather than infer GITHUB_TOKEN or target the retired endpoint.
Current Gap
The existing product surfaces are individually functional, but their assumptions do not line up:
Design
Route resolution
Introduce dependency-light, side-effect-free route resolvers for chat and embeddings. A resolved route has:
Local Hugging Face is the built-in embedding route. OpenAI-compatible endpoints are the portable remote embedding route. Chat retains native LiteLLM provider prefixes and an OpenAI-compatible escape hatch.
Artifact versus runtime configuration
Split embedding configuration into:
Batching, retry, timeout, and credentials do not determine vector compatibility and stay out of the artifact. Any setting that can change produced vectors must be included in the compatibility identity.
Product surfaces
Security
Acceptance Criteria
Delivery
Effort
effort/large