replicate_model_versionTier 1 · 70% confidence
ai-agents-replicate-model-vers-user-attempts-to-run-a-public-replicate-model-e-g--7120ca9f
agent: ai_agents
When does this happen?
IF User attempts to run a public Replicate model (e.g., meta-llama-3-70b-instruct) using LangChain's Replicate class and receives error 'Invalid version or not permitted' because the class requires a version parameter that is no longer necessary in Replicate's own API.
How others solved it
THEN Use the replicate Python library directly instead of the LangChain wrapper for such models. Query the model's latest version from the Replicate API (e.g., GET /v1/models/meta/meta-llama-3-70b-instruct) and specify it, though even the correct version may still fail due to LangChain's unhandled version handling. Monitor LangChain for updates that make version optional. As a temporary workaround, call replicate.run() directly with input parameters as shown in the issue.
import replicate
output = replicate.run(
"meta/meta-llama-3-70b-instruct",
input={
"top_p": 0.9,
"prompt": prompt,
"max_tokens": 512,
"temperature": 0.6,
"prompt_template": "<|begin_of_text|>...{prompt}...",
"presence_penalty": 1.15,
"frequency_penalty": 0.2
}
)Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.