Open-weights agent: 1M context (você controlando)
StepFun Step 5: 1M context window, 600B MoE, open-weights (você controla). Seu agent: preso 4K, caro, fechado.
Equipe OpenClaw · Time de Engenharia & Produto
A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…
Open-weights agent: 1M context (você controlando)
Cenário que está destruindo sua experiência de usuário:
Você tem SaaS com agent (suporte, vendas, automação).
Customer manda uma conversa longa:
Day 1: Customer: "Preciso integrar API X" Agent: "Aqui está o tutorial..."
Day 2: Customer: "Tentei, não funcionou. Erro 401" Agent: "Check your credentials"
Day 3: Customer: "Já checquei. Debugged. Nada." Agent: "Let me check your account..." → Agent loses context (conversation too long) → Agent forgot Day 1 context → Agent can't connect dots → Agent asks: "What are you trying to integrate?"
Customer: FRUSTRATED (already explained on Day 1!) → Customer leaves
Why?
Your agent has 4K context window (GPT-3.5, GPT-4 Mini).
4K tokens = ~3,000 words = 1 customer support ticket.
Longer conversation = context lost = bad UX.
Then: StepFun releases Step 5 Preview
Context window: 1M tokens (1 million)
Size: 4K → 1M = 250x longer conversations
Cost: Open-weights (you host it) = you control cost
What this means:
Old (GPT-4 Mini, 4K context):
- Customer conversation > 4K = context reset
- Customer frustrated (agent forgot context)
- Cost: R$ 0.0003/request (but limited)
- Control: None (OpenAI controls)
New (StepFun Step 5, 1M context):
- Customer conversation can be 1M tokens (250x longer)
- Agent remembers everything (entire conversation history)
- Agent solves problem in 1 message (instead of 10 back-and-forth)
- Cost: You decide (self-host = cheap or expensive, your choice)
- Control: You own the model
The context window problem (why 4K is broken)
What context window actually means
Context = conversation memory
python class AgentConversation: def init(self, context_window=4096): self.context_window = context_window # tokens self.conversation_history = []
def add_message(self, message):
"""
Add message to conversation
If conversation > context_window, oldest messages are forgotten
"""
self.conversation_history.append(message)
# Calculate total tokens used
total_tokens = sum(token_count(m) for m in self.conversation_history)
if total_tokens > self.context_window:
# Oops! Too many tokens, agent loses early messages
self.conversation_history = self.conversation_history[1:] # Forget oldest
# Result: Agent no longer remembers start of conversation
# Agent can't connect dots
# Agent repeats itself
# Customer frustrated
Real example (support ticket):
Context window: 4K tokens (GPT-4 Mini typical) Typical support message: ~200 tokens
Conversation capacity: 4000 / 200 = 20 messages max
Conversation: Message 1: "I can't log in" Message 2: "Check password reset email" Message 3: "Did that, no email" Message 4: "Try forgot password" Message 5: "Same thing, no email" Message 6: "Let me check your account" Message 7: "Error when creating account" Message 8: "What's the error?" Message 9: "'Invalid domain'" Message 10: "What domain are you using?" Message 11: "company.invalid.com" ← Wait, 'invalid' domain? Message 12: "Did you try without '.invalid'?" Message 13: "Works! Thanks!"
→ Only 13 messages before context window full
But now if customer comes back: Message 14: "Now I need to export data" Message 15: "Here's the export feature..." → Agent forgot all context from messages 1-13 → Agent doesn't know customer's domain name → Agent doesn't know what customer's problem was → Agent can't help efficiently
Real SaaS impact (context window problem)
Scenario A: Short conversations (4K works)
Customer: "How do I reset password?" Agent: "Click forgot password, check email, enter new password" Customer: "Done, thanks!"
Conversation length: ~400 tokens Context used: 10% Agent performance: Good ✓
Scenario B: Long conversations (4K fails)
Customer (Day 1): "I'm having integration issues" Agent (Day 1): "Let's troubleshoot. Tell me your setup" Customer (Day 1): "Using Node.js, Express, Stripe API" Agent (Day 1): "Got it. First, check if API key is correct" Customer (Day 1): "Confirmed it's correct" Agent (Day 1): "Check if you're using test vs live key" Customer (Day 1): "Ah! That was it! Using test key in production" Agent (Day 1): "Great! Glad we solved it."
→ Total conversation: 1500 tokens (using 37% of 4K window)
Customer (Day 2): "Now I need to enable webhooks" Agent (Day 2): "Sure! Here's the webhook setup..." → Agent lost context from Day 1 → Agent doesn't remember: Node.js, Express, Stripe, the problem they solved → Agent has to ask again: "What's your setup?" → Customer frustrated (already explained!) → Customer satisfaction down
The StepFun Step 5 solution (1M context = game changer)
What 1M context means
1M tokens = roughly:
1M tokens ≈ 750,000 words ≈ 3,000 pages of text ≈ 50 customer support conversations (full history) ≈ 10 hours of continuous conversation ≈ Entire codebase + documentation + conversation
Comparison:
Model Context Window Capability ───────────────────────────────────────────────── GPT-3.5 Turbo 4K Broken (loses context) GPT-4 8K Still broken GPT-4 Turbo 128K Better, still limited Claude 3 Opus 200K Good StepFun Step 5 1M Exceptional
1M context = 5x better than Claude Opus = 125x better than GPT-3.5 = Can handle real long-form agent tasks
Why 1M context matters for agents
Use case 1: Long customer conversations
Before (4K context): Day 1: Customer explains problem (500 tokens) Day 2: Agent forgot (asks again) Day 3: Customer frustrated (leaves) Result: Support ticket unresolved after 3 days
After (1M context): Day 1: Customer explains problem (500 tokens) Day 2: Agent remembers (continues from Day 1) Day 3: Problem solved (customer happy) Result: Support ticket resolved, customer satisfied
Use case 2: Document analysis + agent
Before (4K context): Customer: "Analyze my API docs and help integrate" Agent: "File too large, can only handle first page" Customer: Frustrated (needs full docs)
After (1M context): Customer: "Here's my 200-page API docs" Agent: "Read entire docs, understand architecture" Agent: "I see your pattern. Here's how to integrate..." Customer: Happy (agent understood everything)
Use case 3: Coding agent with codebase context
Before (4K context): Developer: "Help me debug my app" Agent: "Can only see 50 lines of code at a time" Developer: "Can't debug without seeing full context"
After (1M context): Developer: "Here's my full codebase (50K lines)" Agent: "Read entire codebase, found bug in line 23,456" Agent: "Problem is X, fix is Y" Developer: Happy (agent understood entire system)
The game-changer: Open-weights (you control it)
What "open-weights" means
Open-weights = the model file is public
Closed model (GPT-4, Claude):
- Model is proprietary (OpenAI/Anthropic property)
- You can only call via API
- You have no control (OpenAI controls price, availability)
- Your agent is dependent on external provider
- Risk: OpenAI could shut down, raise prices, delete your account
Open-weights (StepFun Step 5):
- Model file is public (on Hugging Face)
- You can download it (it's yours)
- You can run it on your own servers
- You have full control (price, uptime, privacy)
- Risk: None (you own the model, can't be deleted)
Why open-weights matters for SaaS
Vendor lock-in risk (closed models):
Scenario: You built SaaS using OpenAI API
Day 1: All good Day 100: OpenAI raises prices 10x → Your agent cost 10x → Your margin disappears → You're forced to: A) Raise customer prices (lose customers) B) Absorb cost (go out of business) C) Switch providers (months of work, risky)
Better Scenario: OpenAI deprioritizes your use case → Your requests slow down → Agent becomes slow → Customers complain → You lose revenue
Worst Scenario: OpenAI shuts down your account → Your SaaS stops working overnight → Customers angry → You're out of business
Freedom with open-weights:
Scenario: You self-host StepFun Step 5
Day 1: Agent running on your servers Day 100: StepFun raises prices (for their API) → You don't care (you're self-hosting) → Your cost stays same → Your margin protected
Day 500: Competitor open-sources better model → You download it → You swap it in (takes 1 hour) → You're using latest tech → You stay competitive
Your control: Total Your risk: None Your vendor lock-in: Zero
How to self-host Step 5 (practical guide)
Step 1: Get the model
Download from Hugging Face:
bash
Option A: Using Hugging Face CLI
huggingface-cli download stepfun/step-5-preview --local-dir ./step5-model
Option B: Using git-lfs
git clone https://huggingface.co/stepfun/step-5-preview cd step-5-preview git lfs pull
Result: ~600GB model file (on your server)
Hardware requirements:
Model size: 600B parameters (27B active) Memory needed: ~300GB (with quantization) GPU options:
- 4x A100 (80GB each) → R$ 200k+
- Or rent on Lambda Labs (R$ 100/hour)
- Or use Runwayml (R$ 50/hour)
Step 2: Set up inference server
Using vLLM (recommended):
python from vllm import LLM, SamplingParams
Load model
model = LLM( model="./step5-model", tensor_parallel_size=4, # Use 4 GPUs max_model_len=1000000, # 1M context window )
Create agent
class Agent: def respond(self, conversation_history): # Entire conversation history (up to 1M tokens) is context prompt = format_conversation(conversation_history)
response = model.generate(
prompt,
SamplingParams(
temperature=0.7,
top_p=0.9,
max_tokens=500,
),
)
return response[0].outputs[0].text
agent = Agent() response = agent.respond(full_conversation_history) print(response)
Using Ollama (easier):
bash
Install Ollama
curl https://ollama.ai/install.sh | sh
Run model
ollama run stepfun/step-5-preview
Now available at localhost:11434
Step 3: Integrate with your agent
Update your agent code:
python
Before (using OpenAI API)
from openai import OpenAI
client = OpenAI(api_key="sk_live_..") response = client.chat.completions.create( model="gpt-4", messages=conversation_history, )
After (using self-hosted Step 5)
from vllm import LLM
model = LLM("./step5-model", max_model_len=1000000) response = model.generate( format_messages(conversation_history), SamplingParams(temperature=0.7), )
Same interface, now running on YOUR server
With 1M context (not 4K)
With full control (not vendor locked-in)
The cost comparison (why self-hosting wins)
OpenAI GPT-4 (API, 8K context)
Cost per request: Input: 500 tokens @ R$ 0.015/1K = R$ 0.0075 Output: 300 tokens @ R$ 0.060/1K = R$ 0.018 Total: R$ 0.0255 per request
Monthly (10,000 requests): Cost: R$ 255 Context: 8K (limited) Control: 0% (OpenAI controls)
Yearly: R$ 3,060
Self-hosted Step 5 (1M context)
Upfront (hardware): GPU server: R$ 50,000 (4x A100) Or rent on Lambda: R$ 100/hour = R$ 72,000/year
Monthly (inference + maintenance): Server hosting: R$ 10,000 (4x GPUs @ R$ 2,500/GPU/month) Maintenance/engineer: R$ 5,000 Total: R$ 15,000/month
But: You can serve 1,000,000 requests/month (unlimited) Cost per request: R$ 15,000 / 1M = R$ 0.015 (6x cheaper) Context: 1M (250x larger) Control: 100% (you control)
Yearly: R$ 180,000 (hardware + hosting) But pays for itself at 2,000+ requests/month
Break-even analysis
OpenAI (per year, per 10k requests/month): Cost: R$ 3,060
Self-hosted (per year): Fixed cost: R$ 180,000
Break-even: R$ 180,000 / (R$ 3,060 / 12,000 requests) = 700,000 requests/month
If you have: <100k requests/month → Use OpenAI (cheaper) 100k-700k → Hybrid (OpenAI + self-host)
700k → Self-host (way cheaper)
The strategic advantage (why this matters NOW)
What's changing (October 2026)
Before (2025): Open-source models: Weak (compared to GPT-4) Context window: Limited (4K-8K max) Conclusion: Use closed APIs (OpenAI, Anthropic)
Now (Oct 2026): Open-source models: Competitive (Step 5 is 600B!) Context window: Massive (1M tokens) Conclusion: Self-hosting is viable
Implication: Vendor lock-in is ending Control is shifting to you Cost model is inverting (self-host = cheaper at scale)
Your competitive options
Option A: Stay with OpenAI (API)
Pros: ✓ Easy (no setup) ✓ No ops (OpenAI manages) ✓ Latest features
Cons: ✗ Limited context (8K-128K) ✗ Expensive at scale ✗ Vendor lock-in ✗ No privacy (data sent to OpenAI)
Good for: Early-stage (<100k requests/month) Risk: As you scale, margin disappears
Option B: Hybrid (OpenAI + self-hosted Step 5)
Pros: ✓ Use OpenAI for simple tasks (fast, easy) ✓ Use Step 5 for complex tasks (long context needed) ✓ Hedge risk (not dependent on one provider)
Cons: ✗ Operational complexity (managing 2 models) ✗ Still some vendor lock-in (OpenAI for part)
Good for: Mid-stage (100k-500k requests/month) Risk: Operational overhead
Option C: Full self-host (Step 5 only)
Pros: ✓ Full control (you own model) ✓ 1M context (solve hard problems) ✓ Cheap at scale (R$ 0.015/request) ✓ Privacy (data stays on your servers) ✓ No vendor lock-in
Cons: ✗ Infrastructure cost (need GPU servers) ✗ Operational burden (you manage model) ✗ Slightly lower quality (than GPT-4, for some tasks)
Good for: Scale-stage (>500k requests/month) Win: Margin sustainable, control absolute
The decision (what to do now)
If you're starting out: → Use OpenAI API (easier, less ops burden)
If you're scaling (100k-500k requests/month): → Test StepFun Step 5 (set up self-hosted instance) → Compare quality + cost vs OpenAI → Plan migration (phased, not all-or-nothing)
If you're at scale (>500k requests/month): → Self-host Step 5 immediately → Calculate ROI (likely pays for itself in <3 months) → Improve margin by 80%+ (big competitive advantage)
Conclusion: Open-weights is the future (prepare now)
StepFun Step 5 signals:
- Open-source models are now competitive
- Context windows are finally adequate (1M)
- Self-hosting is viable + economical
- Vendor lock-in is ending
- Control is shifting to you
Your action plan:
Week 1: Download StepFun Step 5 model (public, free) Week 2: Set up test inference server (vLLM or Ollama) Week 3: Run A/B test (Step 5 vs your current model) Week 4: Calculate ROI (cost savings + quality gain) Month 2: Plan migration (if ROI positive) Month 3: Gradual rollout (10% → 50% → 100% traffic) Month 4: Declare victory (full self-host, no vendor lock-in)
The advantage:
If you move NOW (October 2026):
- You have 4-6 months lead time (before everyone else figures it out)
- You can improve margin 50-80% (major competitive advantage)
- You own your infrastructure (no vendor control)
- You control your destiny (can switch models anytime)
If you wait:
- Competitors do it first (they get margin advantage)
- You're playing catch-up (defensive, not offensive)
- You lose market share (to cheaper competitors)
Seu agent: preso em 4K tokens, caro, sem controle? StepFun Step 5 oferece liberdade (1M context, open-weights, você controla) 🔓
Publicado em 17 de outubro de 2026